473,569 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ 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 11532
Hello,

"Cc" <ko*****@singne t.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.DoE vents

Regards,
Fergus
Nov 20 '05 #3
"Cc" <ko*****@singne t.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
18305
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 want to detect when the frame has been loaded with the result of the form submit. Of course I have tried some event handlers like onload, onactivate,...
2
8133
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() h()" ??? is there an equivalent function like sleep() in javascript ? so that one can delay executions of statements via the sleep ?
2
2778
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 into this property in its Load event. So, I gave the BaseForm and the property 'abstract' modifier, and put the implementation of the property in the...
10
10083
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, except a drop down box. Once the user selects from the pull down menu, I have code that picks the applicable fields to be visible. Thus, if a user...
5
5043
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 event must run after derived class' (frmInherited) load event");
2
3468
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 "No", he should not have the option of clicking on any of the six checkboxes. See Code attached. Thank you so much in advance for your help as I...
6
2143
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 called when the form is loaded. this.Load += new System.EventHandler(this.dataBoundGridForm_Load); I mean if I compare form load with the C-tor I...
5
10880
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 have a form that has a button. ( this form is a child form of a parent form ( main form ). Anway...in this child form I have a button, and if clicked...
7
1570
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 number of public methods inside the child forms. How do I iterate thru each child form and run the public method in each? cheers,
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5513
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.