form onload question

  • Thread starter Thread starter Cc
  • Start date Start date
C

Cc

does event onload mean form already loaded or before loaded?
I make a form and I inherit that form on another form, when I run, it
execute the process on the parent form without showing the form on screen
until it done. so does this mean onload mean before form load?

if I want after form load what should I do?
 
Hello,

Cc said:
does event onload mean form already loaded or before
loaded? I make a form and I inherit that form on another
form, when I run, it execute the process on the parent
form without showing the form on screen until it done.
so does this mean onload mean before form load?

'OnLoad' is executed before the handler for the 'Load' event, it raises the
'Load' event. The 'Load' event is raised before the form is being shown for
the first time.
 
Cc said:
does event onload mean form already loaded or before loaded?

OnLoad is an overridable procedure, Load is an event.
I make a form and I inherit that form on another form, when I run,
it execute the process on the parent form without showing the form on
screen until it done. so does this mean onload mean before form
load?

if I want after form load what should I do?

OnLoad is called before the Form is shown the first time. OnLoad raises the
Load event.

The first event after the Form is shown, is the Activated event. Activated
can also occur several times afterwards.

One solution:

Dim f as new form1
f.show
f.refresh
f.StartProcess
 
Hi Cc,

Form_Load occurs before Form.Show, ie. the Form doesn't Paint until
Form_Load is finished. You can, of course, call Form.Show within Form_Load.

A good way to find out what is happening in these sort of situations
(works with mouse down, click/dblclick, up, etc, too) is to have a global
string to which you append a message in each of the event handlers.

Public S As String

In the Form's New()
S = S & "New" & vbCrLf

In Form_Load()
S = S & "Load" & vbCrLf

In Form_Paint()
S = S & "Paint" & vbCrLf

In Button1_Click
MsgBox (S)

What is it that you want to do after Form_Load?

You could put this in Form_Load and see if that helps.
Me.Show
Application.DoEvents

Regards,
Fergus
 
Back
Top