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. Visual Basic
  4. Showing MdiChild Form in widows menu when showing it in a panel in MdiForm

Showing MdiChild Form in widows menu when showing it in a panel in MdiForm

Scheduled Pinned Locked Moved Visual Basic
helptutorial
3 Posts 3 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.
  • A Offline
    A Offline
    Aiman Farouk Mohamed
    wrote on last edited by
    #1

    Dear All: When trying to show Mdichild Form in a panel inside Mdiform, windows menu doesn't show the opened form in its menus items and here is the code dim CURForm As New Windows.Forms.Form CURForm = New FrmPartenersFamilies CURForm.WindowState = FormWindowState.Maximized CURForm.StartPosition = FormStartPosition.Manual CURForm.MdiParent = Me CURForm.Show() CURForm.Parent = Me.SplitContainer1.Panel2 could you help me in this otherwise show me how to a add related menuitem in windows menu Thanks in advance Aiman Farouk

    D P 2 Replies Last reply
    0
    • A Aiman Farouk Mohamed

      Dear All: When trying to show Mdichild Form in a panel inside Mdiform, windows menu doesn't show the opened form in its menus items and here is the code dim CURForm As New Windows.Forms.Form CURForm = New FrmPartenersFamilies CURForm.WindowState = FormWindowState.Maximized CURForm.StartPosition = FormStartPosition.Manual CURForm.MdiParent = Me CURForm.Show() CURForm.Parent = Me.SplitContainer1.Panel2 could you help me in this otherwise show me how to a add related menuitem in windows menu Thanks in advance Aiman Farouk

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Aiman Farouk Mohamed wrote:

      CURForm.Parent = Me.SplitContainer1.Panel2

      You can't do this. The form will no longer be treated as an MdiChild. You're resetting the parent container from the MdiClient control that is implicitly created on an MdiParent form and moving it to a control that knows nothing of MDI.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      • A Aiman Farouk Mohamed

        Dear All: When trying to show Mdichild Form in a panel inside Mdiform, windows menu doesn't show the opened form in its menus items and here is the code dim CURForm As New Windows.Forms.Form CURForm = New FrmPartenersFamilies CURForm.WindowState = FormWindowState.Maximized CURForm.StartPosition = FormStartPosition.Manual CURForm.MdiParent = Me CURForm.Show() CURForm.Parent = Me.SplitContainer1.Panel2 could you help me in this otherwise show me how to a add related menuitem in windows menu Thanks in advance Aiman Farouk

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

        You could show that "Form" in the windows menu by programatically adding it to the menu via something like...

        WindowsMenu.DropDownItems.Add("Whatever")

        I am not sure you can get it to show up as part of your MdiWindowList but you can try with something like...

        MenuStrip.MdiWindowListItem.DropDownItems.Add("Whatever")

        In both cases you would have to handle the DropDownItemClicked event for that menu item programatically to set focus to the "Form" if that menu item was clicked. You would also want to delete the menu item programatically when the "Form" was closed.

        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