"Don" <am****@ix.netcom.com> wrote in message
news:74**********************************@microsof t.com...
hi:
in the past (vb 5.0) is used to create applications with multiple forms.
i would hide and/or show the appropriate form depending on user input. now
i'm using vb.net (still getting used to it) and can not figure out how to
hide and show forms. my project presently has a few forms but i can only
the startup form is visible. i can't hide the startup form or show the
other forms. i would like to hide a form when a button is pressed and then
show another.
thanks in advance
To get used to the procedure, do the following:
Create a simple VB Windows project, then add a second form to it.
Place a label on each form so you can identify which form is displayed.
Place a button on each form.
Place the following code in the Click event procedure of the button on Form1
' create instance of Form2
Dim my2 As New Form2
'Hide current form
Me.Hide()
'Display new instance
my2.ShowDialog()
Place the following code in the Click event procedure of the button on Form2
Dim my1 As New Form1
Me.Hide()
my1.ShowDialog()
Hope this helps.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.