By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,485 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,485 IT Pros & Developers. It's quick & easy.

form onload question

P: n/a
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?
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello,

"Cc" <ko*****@singnet.com.sg> schrieb:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

P: n/a
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
Nov 20 '05 #3

P: n/a
"Cc" <ko*****@singnet.com.sg> schrieb
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
--
Armin

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.