G
Guest
Hi
I want to ask for a user before running the application, and be able to restart the application if the user wants to change the "user"
In my main methode I have something like this (pseudocode)
static void main()
//My user dialoo
MyUserDialog mud = new MyUserDialog(
do
if(mud.ShowDialog == DialogResult.OK)
Application.Run(new...)
}while(myapp.Reenter == true); // myApp is a static in my application
mud.Dispose()
Basically it fails on restart becase the modal dialogs close automatically, but the first time it works properly. When I comment the "Application.Run(new ...)" line, the modal dialog works properly, asking again and again for the user, but with this line uncommented it fails
Thanks in advance.
I want to ask for a user before running the application, and be able to restart the application if the user wants to change the "user"
In my main methode I have something like this (pseudocode)
static void main()
//My user dialoo
MyUserDialog mud = new MyUserDialog(
do
if(mud.ShowDialog == DialogResult.OK)
Application.Run(new...)
}while(myapp.Reenter == true); // myApp is a static in my application
mud.Dispose()
Basically it fails on restart becase the modal dialogs close automatically, but the first time it works properly. When I comment the "Application.Run(new ...)" line, the modal dialog works properly, asking again and again for the user, but with this line uncommented it fails
Thanks in advance.