danielkelly
IS-IT--Management
Hoping someone can provide some assistance with an MDI application I am creating.
Basically i have a parent container and my first child form is a login form where the user enters their logni credentials. This is done by
frmLogin form1 = new frmLogin();
frmLogin.mdiParent = this;
frmLogin.Show();
The problem I am having is that when the user logs in successfully, i want to take them to the Main Menu which is simply a form with a few buttons on it. The question I have is how do I set the mdiparent of the new form to be the main form and not the login form??
I cant use frmMainMenu.mdiParent = this; because that references the frmLogin form not the frmMainParent (the MDI container). I thought using
frmMainMenu.mdiParent = frmMainParent but this generates a error.
Can anyone provide any assistance?? I know i will run into this problem again, because the Main Menu will spawn other Child Forms which will need their Parent Set to the Main Container and not the Form that is is called from.
Thanks in advance
Basically i have a parent container and my first child form is a login form where the user enters their logni credentials. This is done by
frmLogin form1 = new frmLogin();
frmLogin.mdiParent = this;
frmLogin.Show();
The problem I am having is that when the user logs in successfully, i want to take them to the Main Menu which is simply a form with a few buttons on it. The question I have is how do I set the mdiparent of the new form to be the main form and not the login form??
I cant use frmMainMenu.mdiParent = this; because that references the frmLogin form not the frmMainParent (the MDI container). I thought using
frmMainMenu.mdiParent = frmMainParent but this generates a error.
Can anyone provide any assistance?? I know i will run into this problem again, because the Main Menu will spawn other Child Forms which will need their Parent Set to the Main Container and not the Form that is is called from.
Thanks in advance