View Single Post
Old May 11th, 2006, 11:56 AM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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();
		}
	}
}
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote