Checking If Form Is Loaded
-
I have an application that is using a panel to hold a bitmap, for a skin. What I wanted to do was to load the app, then launch the function on form load. It takes a few seconds to load the form, but by the time the form has finaly loaded the update process on the application is already complete. I need my users to know that an update took, place using a progress bar. What is the easiest way to check that the main form is loaded, prior to the function firing ? D
-
I have an application that is using a panel to hold a bitmap, for a skin. What I wanted to do was to load the app, then launch the function on form load. It takes a few seconds to load the form, but by the time the form has finaly loaded the update process on the application is already complete. I need my users to know that an update took, place using a progress bar. What is the easiest way to check that the main form is loaded, prior to the function firing ? D
Seems like you are trying to do a something like a splash screen. If you application starts so fast maybe you can find a better way of notifing the user that an update took place.
-
Seems like you are trying to do a something like a splash screen. If you application starts so fast maybe you can find a better way of notifing the user that an update took place.
Basically just looking to delay my function from firing right away.
-
Basically just looking to delay my function from firing right away.
A delay can be achieved with a Timer. Set your timer interval to a specified amount of time (1000 = 1 second) when your application starts, start the timer as well In your timer TICK event, stop and dispose the timer, and execute your update function. Jon G www.Gizmocoder.com
-
Basically just looking to delay my function from firing right away.
One way would be to hook an event handler to Application.Idle in the handler you have for Form.Load. The Idle event will be raised right after the Form is actually visible to the user. Remember to unhook your handler for Application.Idle in your handler for it. You could also use BeginInvoke, which basically uses WM_POST to acheive a delayed call. So at the end of your Form.Load handler, you could do something like "BeginInvoke(new EventHandler(MyFunction));"