Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi all,
I want to show a little panel with a loading... text on it while opening a dilaog form on the main form. For example; there is a MainForm on my application and a DialogForm used for editing a record. When clicking Edit button on the MainForm, I load the data to the DialogForm (dialog window). So, there is 1-2 second to loading this DialogForm's data. For this reason I have tried to do this process orderly;

1st > I want to disable the MainForm,
2nd > I want to show a little panel with a sample text like "Loading..." until the DialogForm opens.
3rd > When DialogForm opens, the panel should be invisible and the MainForm is still disabled until the DialogForm closed.

Now, there is some way to do this (by simply changing the panel's visible-invisible property, BackgroundWorker, etc.). However, I want to apply the most appropriate and logical method to achieve that. How should I do this? Could you give an example please?
BR
Posted

Have two Panels (or a control of your choice) on your Dialog. One panel will hold all the controls required for the editing and the other can contain a Label, for the "Loading......" message or you can draw the text directly onto the panel.

When the dialog first loads make the 'Loading' Panel visible and hide the other one. As soon as the data is loaded make the 'Data' Panel visible and hide the 'Loading' one.

Alternatively you can use a Progressbar, possibly in a Statusbar, to indicate that data is loading.
 
Share this answer
 
1. create a CSS which is used for poping up.
2. then take a image from toolbar add its source to some .gif file of loading data(u can get that easily in google images).
3. add css class in that <asp:image xmlns:asp="#unknown"> tag.
 
Share this answer
 
If you are using VS 2008 SP1 or later. you can use splash screen very easily..
http://msdn.microsoft.com/en-us/library/cc656886.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900