G
Guest
I am loading a form in this method. I have an accessor that is called Loginstatus within the frmMainForm. When I Instantiate the frmMainForm I want to disable the File Menu if the Loginstatus is false. In VB6 I would do something like this
frmMainForm auth = new frmMainForm()
auth.Loginstatus = fals
However, in C# when I execute frmMainForm auth = new frmMainForm(); the InitializeComponent routine is triggered. I understand that you are not suppose to edit this code? If thats the case then where is the best place to check for the Loginstatus value to see whether the File menu should be enabled or not. Currently I have this checking the Load event of the form
frmMainForm auth = new frmMainForm()
auth.Loginstatus = fals
However, in C# when I execute frmMainForm auth = new frmMainForm(); the InitializeComponent routine is triggered. I understand that you are not suppose to edit this code? If thats the case then where is the best place to check for the Loginstatus value to see whether the File menu should be enabled or not. Currently I have this checking the Load event of the form