Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MDI App, MenuStrip and Icon

MDI App, MenuStrip and Icon

Scheduled Pinned Locked Moved C#
questiondockerhelplearning
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paas
    wrote on last edited by
    #1

    I have an MDI application with, obviously, an MDI container form that includes a MenuStrip that is docked to the top of the form. By clicking on various defined ToolStripMenuItems, a variety of child forms can be opened that are smaller than the MDI container forms window, but can be maximized to fill the window. All of these forms include the same icon that is loaded in each form's load event from the resource properties with code similar to...

    this.Icon = MyProg.Properties.Resources.IconName;

    For some reason when I maximize any of the child forms, instead of the child form's icon and control box merging with the MenuStrip of the MDI container, a separate line above the MenuStrip is being created with just the icon and the control box. I know I am missing the forest for the trees on why this is occuring, because I have another MDI app where I do not have this problem, and I can't figure out what is different between the two. Does anyone who actually read this far have any ideas why this might be occurring? Thanks.

    P 1 Reply Last reply
    0
    • P paas

      I have an MDI application with, obviously, an MDI container form that includes a MenuStrip that is docked to the top of the form. By clicking on various defined ToolStripMenuItems, a variety of child forms can be opened that are smaller than the MDI container forms window, but can be maximized to fill the window. All of these forms include the same icon that is loaded in each form's load event from the resource properties with code similar to...

      this.Icon = MyProg.Properties.Resources.IconName;

      For some reason when I maximize any of the child forms, instead of the child form's icon and control box merging with the MenuStrip of the MDI container, a separate line above the MenuStrip is being created with just the icon and the control box. I know I am missing the forest for the trees on why this is occuring, because I have another MDI app where I do not have this problem, and I can't figure out what is different between the two. Does anyone who actually read this far have any ideas why this might be occurring? Thanks.

      P Offline
      P Offline
      paas
      wrote on last edited by
      #2

      Just as I suspected, I am an idiot. I simply did not have the MainMenuStrip property set on my MDI container to the MenuStrip I had placed on the MDI form. I'm a moron, but at least the MDI app is working as expected again.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups