Quote:
|
Originally Posted by Kilo
I would suggest loading your main form.
Then in the main form load event load frmPassword
when you load frmPassword pass the main form to an overloaded constructor
create a form object on your frmPassword
ex.
Form mainFormInstance;
after the instance is passed to the contructor store it in your new variable
immedialty disable the main form -> mainFormInstance.Enabled = false;
after that create a closing event for frmPassword and within that
enable the main form.
|
Ew. :p
class Program
{
frmMain MainForm;
frmPassword PasswordForm;
public static void Main (string[] args)
{
if (something)
{
PasswordForm = new frmPassword();
PasswordForm.Show();
}
else
{
MainForm = new frmMain();
MainForm.Show();
}
}
}