|
Luc Pattyn wrote: and hence your tip does not work, whereas setting it to something else
such as DialogResult=Yes; would work
(but it would then violate the GUI conventions, as I keep telling you).
As it is only the case with ShowDialog and not with Show() and I tested it with show, I think it's not my fault.
I wouldn't have given such a suggestion if I knew that fact!
All the best,
Martin
|
|
|
|
|
And that's how we keep learning things every day.
"I think it's not my fault" Right, we all have a partial view on the whole thing,
every statement needs a lot of ifs and whens.
And the next question probably will be: when I hit the escape key, I want my form/dialog to
close, and I want to discriminate all three (ESC/CancelButton/CloseBox) ???
|
|
|
|
|
But only on Mondays!
Wait I think there is such a system allready on the market. YEP: "SAP"
All the best,
Martin
|
|
|
|
|
Indeed, they are the experts as to f*cking up a GUI.
Think thats part of their business model.
|
|
|
|
|
Hi all,
I have created a Page on which i want the user to be able to download files,
I want to display the name of the files and when the user clicks on the file name the save File dialog should be displayed so that the user can select the location of the file where it has to be saved.
Any sample code or links regarding this will be appreciated.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
The anchor tag will do this for you, depending. Where do the files live ? Are they on the server, or in the database ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
They are on a Sharepoint Server.
I get all the attachments from a list and display the names on the page by creating LinkButton for each of them.
now i want the display the save dialog box when the user clicks on the LinkButton and then the file should be saved on the location given by the user.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
how to build a glossary in c#.....with person names as hyperlinks.when hyperlink is clicked information regarding that person shoud be displayed.please help me ..its urgent.
|
|
|
|
|
It's ALWAYS urgent
Most likely, you'd have the data in your database, and you'd link back to a page that shows the details that takes the Id of hte person on the query string, so you can load it from the database.
Are you doing this for school, or for your job ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi, my problem is in .aspx page i have 2 dropdown list buttons one is for to select status and one is for to select for usertype.
What i want is in designing phase if i select status as 1 then in second dropdownlist displays only related item how to do this one, any one give me one idea.
for example if i select like below in second dropdownlist displays related item
<pre>
DropDownList1.SelectedItem .Text="1"
</pre>
srinivas
|
|
|
|
|
1 - give your variables real names
2 - handle the selected index changed event on the first list, and when it fires, populate the second list accordingly
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
In windows application we are using datagrid in readonly mode. If user right clicks on particular cell then copy/ paste menu is displaying. User is copying content and trying to paste in other cell, as datagrid is in readonly mode so user can't paste, but in first cell it is showing edit icon.
We don't want that edit icon if datagrid is readonly, so I thought we can disable right click menu only.
If any other solution is available for hiding edit icon, please let me know.
Anybody if knows, solution for this, please give URL or sample code.
Thanks & Regards,
Kumar
|
|
|
|
|
Hello
You can disable the contextmenu if you path an empty menu to the property of the control:
ContextMenu cm = new ContextMenu();
yourControl.ContextMenu = cm;
Or you modify the existing menu liek you want.
All the best,
Martin
|
|
|
|
|
Hello Martin,
Thank you for your reply, but it is working for datagrid like column header.
My problem is datagrid populated with few rows and columns, If I select from columns new menu is not displaying, it is displaying default windows right click menu i.e. Undo, Cut, Copy, Paste,Delete and Select All.
I want to disable or hide this menu.
once again thank you for your help.
Thanks & Regards,
Kumar
|
|
|
|
|
Hello,
In .Net 2.0 version, windows form, we are using readonly datagrid. for this grid if user selects any cell and right click then windows context menu i.e. cut, copy, paste... is displaying.
Now user is selecting some other cells and try to paste then in rowheader it is dispalying edit icon. We don't want this edit icon should be display at rowheader but context menu should be display.
Your help is greatly appreciated.
Thanks & Regards,
Kumar
|
|
|
|
|
Hi,
I am doing an application that is using webservice & displaying data.So every 30 seconds the application will call webservice, I use system.Threading.Timer it is working fine.CPU usage is very less (maximum 30).I got an additional task to play video files.So it will be maximum 8 video in a screen (video files located in local system) & very 30 seconds according to data from ws video file will change.I write the code like this.In timer callback event I am Executing 2 functions
[Code]
System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetNextPage), state); // going 2 next page, in a page displaying 8 rows
System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetNextVideo), state); // displaying corresponding video
//in delegate of video I put the below code
wmp = (AxWMPLib.AxWindowsMediaPlayer)Arrctrl[0]; //Find the control bcos adding at runtime
thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(PlayCurrentWMP)); //PlayCurrentWMP is assign the URL & play
thread.Priority = System.Threading.ThreadPriority.Lowest;
thread.IsBackground = true;
thread.Start(wmp);
[/Code]
Please advice what is wrong in my coding. Thanks in advance
|
|
|
|
|
Cant tell from what you told us.
Some ideas/suggestions:
- maybe movie takes more than 30 seconds
- maybe you keep adding threads
- add a thread counter; increment it at the beginning of the threaded method (PlayCurWMP)
and decrement it at the end; show it all the time
- maybe you are exhausting the ThreadPool
- I would add logging in all relevant parts, so you get a history line of what is going
on;
- you even may try to correlate your CPU load (observed, or obtained programmatically) with
that time line.
|
|
|
|
|
hi,
Thanks for the reply.When I start the application I am adding control runtime.If I try to play the movie suddenly CPU usage become 100% & the application runs very slowly.
Can you suggest is it AxWMPLib.AxWindowsMediaPlayer taking the memory?
Every 30 seconds I am updating the screen using Threading.Timer & delegates.So id the screen changes I need to change all the videos.
Can you pls help me How I play video with out affecting my screen display & reduce the CPU usage?I am not good in threading.Please give the code...
Thanks a lot..
|
|
|
|
|
I dont have code for this.
I gave you suggestions and ideas, that will be it.
One more suggestion: make sure you dont have a thread touch a control it did not create
(on old .NET, before 2.0) that may cause almost any anomaly; on .NET >= 2.0 it should
give an InvalidOperationException with some cross-thread remark in the message.
Thats all I can do for you.
|
|
|
|
|
I developed a C# windows application in .net2003. What i need is how to start that application along with the windows. Is there any setting in the code to achieve this.
I am grateful if any one helps me.
Thanks in Advance.
Ramu
|
|
|
|
|
You can put the exe or Shortcut of the exe in windows startup
C:\Documents and Settings\Your Computer Name\Start Menu\Programs\Startup
Thanks
|
|
|
|
|
|
Ramu.M wrote: how to start that application along with the windows
Do you mean when Windows starts or when a user logs in? In the former case, you'll need to create a Windows service; for the latter, see this[^] link.
/ravi
|
|
|
|
|
Thank you very much for providing an excellent link.
Once again Thank You.
Ramu
|
|
|
|
|
Hi everybody,
I have a quick question about listboxes. I have a project where I want to take a string, and see if a Listbox full of substrings has any matches in it. So if the big string is "abcdefg" and the listbox has "arq", "bcd" and "qrs", then the answer is YES. For example:
//listbox is populated with "chunks" of data
string xyz;
foreach(string in the listbox)
{
//does this listbox string exist somewhere in the big string xyz?
if(true)
{
//do something
}
}
I have no idea how to do this. It seems simple enough but there doesn't seem to be the right method out there.
Thanks for your time,
Michael Fritzius
|
|
|
|