Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Leaders
Posted
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.
[sIGPIC]e[/sIGPIC]
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...