473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

When forms opens...

In VB6 there is form_load event....what's the equivalent in VB.Net. I want
to write to code to checked=true or false for some of the Check Box controls
on the form...........and I want to write this code when form loads.....

Thanks in advance!
Nov 20 '05 #1
8 921
Hi Sender,

The form load event still exists...

Public Sub OnFormLoad(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
...
End Sub

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
"Sender" <us**@domain.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
In VB6 there is form_load event....what's the equivalent in VB.Net. I want
to write to code to checked=true or false for some of the Check Box controls on the form...........and I want to write this code when form loads.....

Thanks in advance!

Nov 20 '05 #2

"Sender" <us**@domain.com> escreveu na mensagem
news:uz**************@TK2MSFTNGP11.phx.gbl...
In VB6 there is form_load event....what's the equivalent in VB.Net. I want
to write to code to checked=true or false for some of the Check Box controls on the form...........and I want to write this code when form loads.....

Thanks in advance!

Select the Load event too!
Just double-click the form, like VB6.....

----
Rafael Pivato

Nov 20 '05 #3
I think I am missing very basic here...but I don't know what... For
example, if I start a new project with form1 and then I open form1.vb (code
window) and select "form1" in the first list box then I don't find
"form1_load" event. However, when I double-click the form (as suggested by
you) then automatically "form1_load" comes in the second list box. Could
you please tell why is that and what I am missing..

Thanks
"Rafael Pivato" <rp*****@cpovo.net> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...

"Sender" <us**@domain.com> escreveu na mensagem
news:uz**************@TK2MSFTNGP11.phx.gbl...
In VB6 there is form_load event....what's the equivalent in VB.Net. I want to write to code to checked=true or false for some of the Check Box

controls
on the form...........and I want to write this code when form loads.....

Thanks in advance!

Select the Load event too!
Just double-click the form, like VB6.....

----
Rafael Pivato

Nov 20 '05 #4
"Sender" <us**@domain.com> scripsit:
I think I am missing very basic here...but I don't know what... For
example, if I start a new project with form1 and then I open form1.vb (code
window) and select "form1" in the first list box then I don't find
"form1_load" event. However, when I double-click the form (as suggested by
you) then automatically "form1_load" comes in the second list box. Could
you please tell why is that and what I am missing..


On the top border of the code editor you will find 2 comboboxes. Select
"base class events" in the left combobox, then select the event in the
right combobox.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
"Sender" <us**@domain.com> scripsit:
In VB6 there is form_load event....what's the equivalent in VB.Net. I want
to write to code to checked=true or false for some of the Check Box controls
on the form...........and I want to write this code when form loads.....


You can do this in the 'Load' event handler or in the constructor after
the call to 'InitializeComponent'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
In article <er**************@TK2MSFTNGP09.phx.gbl>, Sender wrote:
I think I am missing very basic here...but I don't know what... For
example, if I start a new project with form1 and then I open form1.vb (code
window) and select "form1" in the first list box then I don't find
"form1_load" event. However, when I double-click the form (as suggested by
you) then automatically "form1_load" comes in the second list box. Could
you please tell why is that and what I am missing..

Thanks

You need to drop down the to the Form1 Events entry... In other words,
in the left hand drop down, you'll see something like:

Form1
(Overrides)
(Form1 Events)

Select the From1 events, and then the right hand drop down will contain
the event list :)

Tom Shelton
"Rafael Pivato" <rp*****@cpovo.net> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...

"Sender" <us**@domain.com> escreveu na mensagem
news:uz**************@TK2MSFTNGP11.phx.gbl...
> In VB6 there is form_load event....what's the equivalent in VB.Net. I want > to write to code to checked=true or false for some of the Check Box

controls
> on the form...........and I want to write this code when form loads.....
>
> Thanks in advance!
>
>

Select the Load event too!
Just double-click the form, like VB6.....

----
Rafael Pivato


Nov 20 '05 #7
"Sender" <us**@domain.com> schrieb
In VB6 there is form_load event....what's the equivalent in VB.Net. I
want to write to code to checked=true or false for some of the Check
Box controls on the form...........and I want to write this code when
form loads.....


Use the Load event.
--
Armin

Nov 20 '05 #8
Same event occurs, in the VB.NET designer just double click on the form and
the form_load event will be created for you.
cheer
"Sender" <us**@domain.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
In VB6 there is form_load event....what's the equivalent in VB.Net. I want
to write to code to checked=true or false for some of the Check Box controls on the form...........and I want to write this code when form loads.....

Thanks in advance!

Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Scott | last post by:
Creating an application in Access with a number of "screens" which are just forms linked together by command buttons (click button, opens new form, closes old form). Each form opens and...
6
by: joebob | last post by:
I've got two forms, Form1 and Form2. Form1 opens invisibly when the database opens. From Form1 (or from a regular module or class module accessed by Form1), is there a way to detect when Form2...
4
by: lauren quantrell | last post by:
I have an Access 2K popup form to which I have added buttons to run DoCmd.Maximize The problem is the form opens full height on the screen, with the bottom of the form hidden under the Windows...
9
by: Sandy | last post by:
Hi all, I have a form to list records (frmListIssue) which I call from different other forms. My wish is to display a message when the form is called and empty; no records to display. I want to...
3
by: RD | last post by:
Dim myfrm as new frmb myfrm.show() Dim myfrm2 as new frmc myfrm2.show Opens two forms from a butom located on forma when I close forma I would like both form myfrm and for myfrm2 to close...
3
by: Brad Allison | last post by:
Is there an easy way to close one form when another opens? Thanks for the information. Brad
5
by: Rick Wannall | last post by:
I use the following script to open an Access app, to avoid the security warnings: dim o set o=createobject ("Access.Application") o.automationsecurity=1 'set macro security LOW....
5
by: Michael.Suarez | last post by:
Suppose I have a button on a form that opens up another form. the code in the buttons click event is: frmMyCustomForm frm = new frmMyCustomForm (); frm.ShowDialog(); frm.Dispose(); The...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
2
DonRayner
by: DonRayner | last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...

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.