473,473 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

form onload question

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
3 11523
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I...
2
by: brian | last post by:
question about Onload function can one define more than one function for Onload ? <body Onload="function1()"> or can one define multiple functions one after another like <body Onload="f() g()...
2
by: Yasutaka Ito | last post by:
Hi folks! I have a BaseForm class that inherits System.Windows.Forms.Form. It has a property, whose value I need supplied by the class that inherits it. The BaseForm usees the value supplied...
10
by: Cy | last post by:
I've had good luck with posting in the past, so we'll see how things go this time...:) I have an Access 2000 form. On the form is about 40 objects. I want to set everything to invisible,...
5
by: Sergey Atun | last post by:
Hi, I inherited form and I writed it's load event: public class frmBase: System.Windows.Forms.Form { .... private void frmBase_Load(object sender, System.EventArgs e) { MessageBox.Show("this...
2
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button...
6
by: tony | last post by:
Hello! When exactly is it important or advisable to use this form load event handler compare to using the C-tor. For example here I create an event handler called dataBoundGridForm that is...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
7
by: Mark Chimes | last post by:
Hi All, I have multiple copies of the same form open in an app. (These are not MDI child forms). I then open a summary form that displays data from each of the previously open forms. I have a...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.