469,575 Members | 1,249 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Load/Unload forms

I am used to VB6 where frmMain.unload, frmNew.load worked.

What replaced this in vb.net?
Nov 20 '05 #1
4 5891
"Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> schrieb
I am used to VB6 where frmMain.unload, frmNew.load worked.
You mean Load frmMain and Unload frmMain? ;-)
What replaced this in vb.net?


To create a Form instance use
Dim frmMain As New MyMainForm

To show it call
frmMain.Show
The first time before the Form is shown, it's Load event is raised.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> scripsit:
I am used to VB6 where frmMain.unload, frmNew.load worked.

What replaced this in vb.net?


\\\
Dim f As New Form1()
f.Show()
///

.... later:

\\\
f.Close()
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3
In dot Net,form is an object.
It still have Load function,you can place codes in
there ,but it does not have an event called Unload.Instead
of that ,dot Net have an event which is called Disposed.
Nov 20 '05 #4
Awesome, Thanks guys!

"Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I am used to VB6 where frmMain.unload, frmNew.load worked.

What replaced this in vb.net?

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by DB2 Novice | last post: by
2 posts views Thread by Lauren Hines | last post: by
2 posts views Thread by brianbender | last post: by
7 posts views Thread by Michael Erlewine | last post: by
7 posts views Thread by tojigneshshah | last post: by
1 post views Thread by Ivan | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.