Found this solution:
"Public Class MainClass
Public Shared Sub Main()
FirstForm = New Form1()
SecondForm = New Form2()
FirstForm.Show()
Application.Run()
End Sub
Private Shared m_FirstForm As Form1
Private Shared m_SecondForm As Form2
Public Shared Property FirstForm() As Form1
Get
Return m_FirstForm
End Get
Set(ByVal Value As Form1)
m_FirstForm = Value
End Set
End Property
Public Shared Property SecondForm() As Form2
Get
Return m_SecondForm
End Get
Set(ByVal Value As Form2)
m_SecondForm = Value
End Set
End Property
End Class
///
Set your project's startup object to MainClass.
Use this code to switch between the 2 forms:
\\\
Private Sub Button1_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles Button1.Click
MainClass.FirstForm.Hide()
MainClass.SecondForm.Show()
End Sub
///
You can use Application.Exit to shut down your application.
Notice that the way described above is only one possible solution...
Regards,
Herfried K. Wagner"
"Cor" <no*@non.com> skrev i melding
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi Able,
This sounds strange, can you send some piece of code
(only the par from the page load and the hide and please first copied it
to a notebook and then copied and pasted back in the mail).
Maybe we can help you then.
Cor