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 form

MDI form

Scheduled Pinned Locked Moved C#
question
3 Posts 2 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.
  • V Offline
    V Offline
    vatzcar
    wrote on last edited by
    #1

    i have two form: Form1, Form2 and Form3. Form1 is MDI Parent form. i'v made Form2 to open when one menu is clicked from Form1. Now Form2 has one button which should show Form3, and i'v done the code this way: Form3 frmF3 = new Form3(); Form1 fm1 = new Form1(); frmF3.MdiParent = fm1; frmF3.Show(); but clicking the button is performing nothing. how can i do that?

    R 1 Reply Last reply
    0
    • V vatzcar

      i have two form: Form1, Form2 and Form3. Form1 is MDI Parent form. i'v made Form2 to open when one menu is clicked from Form1. Now Form2 has one button which should show Form3, and i'v done the code this way: Form3 frmF3 = new Form3(); Form1 fm1 = new Form1(); frmF3.MdiParent = fm1; frmF3.Show(); but clicking the button is performing nothing. how can i do that?

      R Offline
      R Offline
      rabih_kai
      wrote on last edited by
      #2

      Dear, Try to structure your code by doing the following: -In form3 add the following Function: public void Create(Form ParentWnd) { MdiParent = ParentWnd; Show(); } - Now from Form2 do the follwing from a function of course: Form3 form3 = new Form3(); Form ParentForm = this.MdiParent; form3.Create(ParentForm); I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design

      V 1 Reply Last reply
      0
      • R rabih_kai

        Dear, Try to structure your code by doing the following: -In form3 add the following Function: public void Create(Form ParentWnd) { MdiParent = ParentWnd; Show(); } - Now from Form2 do the follwing from a function of course: Form3 form3 = new Form3(); Form ParentForm = this.MdiParent; form3.Create(ParentForm); I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design

        V Offline
        V Offline
        vatzcar
        wrote on last edited by
        #3

        thanx for ur help :) i did this way Form3 frmF3 = new Form3(); frmF3.MdiParent = this.MdiParent; frmF3.Show(); it worked. thanx 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