Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In excel addin 2007 project, I have a windows form. I need to display this windows form as the MDI child of Excel application.
Now its displayed as a separate form.

C#
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Form1 obj = new Form1();
obj.Show();
}

Please help me as early as possible.
Posted
Updated 5-Aug-10 21:14pm
v3

1 solution

When you set the MDIParent property of a child window it becomes an
MDIChild of the parent.
Form1.MdiParent = parentForm;

I'm not sure how well this will work using Excel as the parent, but try it and report back what happens.
 
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