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

When forms opens...

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a
"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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.