Running code after form is displayed

  • Thread starter Thread starter Jason Callas
  • Start date Start date
J

Jason Callas

I have been searching for an answer to this question with no luck. The only
answer I saw does not seem to work.

I need to run some code (specifically something that will check and download
software updates) after the form is displayed. The answer I saw said I
should put the code in the forms Activated event. But this event is still
going off for the first the BEFORE the form is shown. I know this because I
put a sleep statement towards the end (after my run-once code) and did not
see the form on the screen. As soon as the sleep ended, the form appeared.

Any help would be appreciated.

- Jason
 
* "Jason Callas said:
I have been searching for an answer to this question with no luck. The only
answer I saw does not seem to work.

I need to run some code (specifically something that will check and download
software updates) after the form is displayed. The answer I saw said I
should put the code in the forms Activated event. But this event is still
going off for the first the BEFORE the form is shown. I know this because I
put a sleep statement towards the end (after my run-once code) and did not
see the form on the screen. As soon as the sleep ended, the form appeared.

In the form's 'Load' event handler, try this:

\\\
Me.Show()
Me.Refresh()
PerformTheUpdate()
///
 
Back
Top