"UJ" <UJ@nowhere.com> schrieb:
I am trying to do a login screen and can't figure out how to get the new
window to open after I have verified the user info. I tried the following:
dim win_Main as MainWindow
win_Main = new MainWindow
Main.Show()
me.close()
but as expected, everything closes down. There must be an easy way to do
this that I just don't know about. I also am going to need to transfer
things to the new window (like the username, privs, ...) any help would be
appreciated.
\\\
Public Module Program
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
End Sub
End Module
///
In the project properties, select 'Sub Main' as startup object. Place the
code below in a button's 'Click' event handler:
\\\
Dim f2 As New Form2()
f2.Show()
Me.Close()
///
You can exit the application by calling 'Application.ExitThread'. Take a
look at the 'ApplicationContext' class too.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>