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. C# 2005 - childForm setting MDIParent of another childForm

C# 2005 - childForm setting MDIParent of another childForm

Scheduled Pinned Locked Moved C#
questioncsharpwinformshelp
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.
  • J Offline
    J Offline
    JC Carmo
    wrote on last edited by
    #1

    Hello everyone, Here's the scenario: I have three windows forms (frmMain, frmClients, frmOrders). There's a button on frmClients that opens frmOrders. Now, the question is: What's the code on frmClients to define that the frmOrders' MDIParent is frmMain? Thank you very much for your time and help, JC Carmo.

    N A 2 Replies Last reply
    0
    • J JC Carmo

      Hello everyone, Here's the scenario: I have three windows forms (frmMain, frmClients, frmOrders). There's a button on frmClients that opens frmOrders. Now, the question is: What's the code on frmClients to define that the frmOrders' MDIParent is frmMain? Thank you very much for your time and help, JC Carmo.

      N Offline
      N Offline
      nandank81
      wrote on last edited by
      #2

      hi,if you declare frmOrder's MDiparent as frmmain, then you cannot show frmOrder just like that. you have to show the mdiparent of the formorder and then show formorder. the code inside the button will be like Order frm = new Order (); FrmMain frmMain = new FrmMain(); frmMain.Show(); frm.MdiParent = frmMain; frm.Show(); but infrmmain, the IsMDIContainer property should be set to true. try this. all the best. those who win are those who believe they can

      1 Reply Last reply
      0
      • J JC Carmo

        Hello everyone, Here's the scenario: I have three windows forms (frmMain, frmClients, frmOrders). There's a button on frmClients that opens frmOrders. Now, the question is: What's the code on frmClients to define that the frmOrders' MDIParent is frmMain? Thank you very much for your time and help, JC Carmo.

        A Offline
        A Offline
        AB7771
        wrote on last edited by
        #3

        Hi, u can simply write frmOrders.MDIParent = this.MDIParent; Hope that works for u Regards, Pramod

        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