Init code after form visible

  • Thread starter Thread starter Paul N
  • Start date Start date
P

Paul N

Maybe this question has been answered before, if so please refer to answer:

I want to run some initialization code in my main form, after the form is
made visible.
My current solution is to end form_init with the following:

me.show()
MyInitCode()

Is this a correct solution? I fear adverse side effects because form_init
has not run to completion when I call my code.

I also considered form_activate to call my init, but this is executed more
than once, so I would have to test a boolean eg "AlreadyInited"; not very
elegant.

Any feedback or hints welcome.

Thanks
Paul
 
Considered Activate event, but this is called multiple times, so requires a
boolean to init only once.
Is it worth it or is it safe to place the init code in form_init (which is
called exactly once)?

Paul
 
Back
Top