R
Rexel
In VB6 I usually use the form's events in the following order:
Initialize: To initialize variables if need be. Controls are not yet
loaded.
Load: Now that controls are loaded they are set up, e.g., combo
boxes are loaded, textboxes are filled with default values if needed,
controls are enabled/disabled according to the circumstanses.
Resize: My forms are all opened maximized, so this event is used
to resize the controls.
But in VB.NET it is different. I can put the Initialize code in the New
constructor. But it seems that controls are loaded there two, so I can
put the code I used to use in VB6 Load event in the New, after the
InitializeComponents.
Besides in VB.NET the Load event fires AFTER the Resize event.
So why or when do I need to use the Load event?
Initialize: To initialize variables if need be. Controls are not yet
loaded.
Load: Now that controls are loaded they are set up, e.g., combo
boxes are loaded, textboxes are filled with default values if needed,
controls are enabled/disabled according to the circumstanses.
Resize: My forms are all opened maximized, so this event is used
to resize the controls.
But in VB.NET it is different. I can put the Initialize code in the New
constructor. But it seems that controls are loaded there two, so I can
put the code I used to use in VB6 Load event in the New, after the
InitializeComponents.
Besides in VB.NET the Load event fires AFTER the Resize event.
So why or when do I need to use the Load event?