This one has really got me stumped. I have certain forms that are being instantiated. When I instantiate a form i make it a child of the mdi form by
form1.MdiParent = this;
I have set the MDIWindowListITem property of my menustrip to a toolstripmenuitem
However this toolstripmenuitem does not show the mdi child form when it is instantiated
Does any one have any ideas on this?
Any inputs/ leads / hints would be most welcome. I am using .net framework 3.5
Regards
,
You have to write your code so that it is added manually I believe.
See the example here for pointers:
MSDN help on ToolStripPanel
Edit
You’re right ignore my previous entry here’s the code for a very simple MDI app that appears to do what your after.
It is just two blank forms. Form1 has
IsMDIContainer=true. It also hasmenuStrip1, which contains two items “new” (newToolStripMenuItem) and “windows” (windowsToolStripMenuItem). Clicking new will open a new child window. I have set theMDIWindowListItemofmenuStrip1towindowsMenuStripItem. When a new child window is opened clicking onwindowsMenuStripItemproduces a drop down that shows all windows open.There is no code in Form2.
The child windows only show below
windowMenuStripItemonce Form.Show() has been called.Without this they do not show in the list.