Code in MDI child form Activated event handler causes form to appear as partially visible when loadi

  • Thread starter Thread starter RJ
  • Start date Start date
R

RJ

I want to have the entire form remain invisible until after all the code in
the Activated event handler has executed. The current behaviour - the form
appears to "freeze" before completely being painted, then hesitates a few
seconds before completely painting.
In my testing, I simulate the form paint problem in a normal SDI form. I
tried setting the .SetVisibleCore property, but this resulted in an
"activation loop". That is, the activated event handler calls
SetVisibleCore, SetVisibleCore raises the activated event. Any ideas?

Thanks,
RJ
 
Bryan, Unfortunately, the slow running code in the Activated handler, is
acquiring data to be displayed on the form, so I must wait for the data
acquisition code to complete. I thought about running the code on another
thread, but I still must defer visibility of the form.
 
If it is possible, try to get your data before calling the Show method
on the form. Also, if this is the first form in the application, you
could display a splash screen while the data loads.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
 
Back
Top