joe_pool_is Posted July 8, 2008 Posted July 8, 2008 I'm tackling my first MDI project. I have my MDI child loading up fine in my MDI parent. The parent has an icon and I assigned the same icon to the child so that they match. Now, if I maximize my child, it fills the parent, but the main menu gets large and includes the icon of the child - only bigger. Whoops! Not what I wanted. How do I fix this? Does the child form need a special FormBorderStyle property? Currently, I have it set to Sizable. Quote Avoid Sears Home Improvement
Leaders snarfblam Posted July 10, 2008 Leaders Posted July 10, 2008 The icon is duplicated because the MDI child icon always appears on the left edge of the menubar when the MDI child is maximized. The fact that it is scaled, I'm guessing, is caused by a menubar that is larger than the default size. You could consider setting the Icon property to null when the child is maximized and restoring it when the form is restored. Quote [sIGPIC]e[/sIGPIC]
joe_pool_is Posted July 10, 2008 Author Posted July 10, 2008 I tried setting it to null, and I got Visual Studio's default icon there instead. After fooling around with it for a while, it looks like it shows the icon in whatever size the icon actually is. I had loaded a 32x32 icon, which displayed nicely on the form, but grew to its full size whenever I maximized it. I replaced that icon with a 16x16 icon, and it looks ok. I'll keep it! :) For the record: MDI forms are a lot of work! Expecially with activating the MainMenu items, creating delegates to handle click events, and finding out how/when to activate the Cut/Copy and Paste items on the toolbar. Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.