Form_Load event.

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

In vb6, you could do all the resizing of the form (and its constituent
controls) in the form_load event, knowing that the form won't show up
until the Form_load event was exited.

In my vb.net app, I resize a bunch of controls, etc... in the Form_Load
event, but it seems that when the form actually appears on the screen,
there is still resizing going on.

How can I make sure that the form shows up after all the resizing has
been finished.

Thanks.
 
Frank,

There is a difference between the showing of a MDI form and the showing of a
normal form, what are you using.

The normal form shows in normal code up after the completion of the Load
event. (It shows up in that event earlier when you place in that by instance
"me.show")

I hope this helps?

Cor
 
Hi,

Form load event fires when the form is loading the activate event
fires after is loaded.

Ken
---------
In vb6, you could do all the resizing of the form (and its constituent
controls) in the form_load event, knowing that the form won't show up
until the Form_load event was exited.

In my vb.net app, I resize a bunch of controls, etc... in the Form_Load
event, but it seems that when the form actually appears on the screen,
there is still resizing going on.

How can I make sure that the form shows up after all the resizing has
been finished.

Thanks.
 
* Frank Rizzo said:
In vb6, you could do all the resizing of the form (and its constituent
controls) in the form_load event, knowing that the form won't show up
until the Form_load event was exited.

In my vb.net app, I resize a bunch of controls, etc... in the
Form_Load event, but it seems that when the form actually appears on
the screen, there is still resizing going on.

The form is shown after the last line of your 'Load' event handler is
executed. So you should no see any resizing going on. It's a known
problem that forms may flicker when being shown for the first time. To
speed up your resizing implementation, take a look at the form's
'SuspendLayout' and 'ResumeLayout' methods.
 
Back
Top