Kevin I have you answer. This code make Form1 and Form2 work just like in
VB6
I new there had to be a simple way to only have one instance of every form
in your app and be able to effect the form and controls exactly like in vb6.
So I Finally figured out an easy way to do it.
Module Module1
Public WithEvents frm1 As New Form1()
Public WithEvents frm2 As New Form2()
Public jim As String
Public Sub main()
Application.Run(frm1)
End Sub
End Module
__________________________________________________ __________________________
_________
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
frm2.Show()
Me.Hide()
End Sub
_________________"Code in
Form1_____________________________________________ __________________________
_______
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
frm1.Visible = True
End Sub
________________"Code in
Forn2_____________________________________________ __________________________
_____________
"Kevin" <ke****@cfl.rr.com> wrote in message
news:ae********************************@4ax.com...
In VB6 I have this in frmMain:
Private sub Button1_Click()
frmSecondOne.Show
me.Hide
End Sub
and then in frmSecondOne:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
frmMain.Show
End Sub
How do I do this in VB.NET?