Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have three forms

MainForm
LoginForm
ControlPanelForm

Na Main form is MDI container, on load I start Login form inside MDI, after user enter information and press button I need to open Control Panel form but inside MDI container.

This is what I try:
C#
ControlPanelForm OpenNew = new ControlPanelForm();
//OpenNew.MdiParent = this;
OpenNew.MdiParent = MainForm.MainForm;
OpenNew.Show();


I dont know how to reference to mainForm
Posted
Updated 30-Mar-10 4:11am
v2

What about this.MdiParent? I think this would be the Login form (right?) and the MDI should be the same..
 
Share this answer
 
You are my hero.
Thank you so much.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900