Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Updating

Status
Not open for further replies.

BobBob10

Programmer
Apr 24, 2005
57
GB
I have a program that when you go from one form to another, on the second forms load event I run code that dynamically creates controls and places them in a panel.

However, only after the program has ran the controls appear. What I want is the controls to appear as the program runs.

How could I do this?
 
This is normal behavior. The controls won't appear on the form until the Form_Paint event fires, which occurs after Form_Load finishes executing. I believe the events fire in this order when a form is created (someone plese correct me if I'm wrong):

Construtor
Load
Layout
Activated
Paint



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Yes..thats about it.
I seem to recall, that if you need to use an event after form paint, but just before the form displays, then you can utilise the visiblechanged event.


Sweep
...if it works, you know the rest..
Always remember that Google is your friend

curse.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top