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. Windows Forms
  4. mdi form

mdi form

Scheduled Pinned Locked Moved Windows Forms
help
4 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.
  • N Offline
    N Offline
    Naresh123456789
    wrote on last edited by
    #1

    hi all, i am facing a problem in windows mdi form application.how can we know a child form is exist or not. in mdi form i have taken toolstripmenuitem.in that click event i was trying to show a child form1 when we click that menu item for that i am using show method.but when click second time the new child form1 is created.i want show that child only once.if its already it must be restored.how can restore the child form1 if its already exists .and how can we if child form is exist or not. thanks in advance regards obalesu n

    D 1 Reply Last reply
    0
    • N Naresh123456789

      hi all, i am facing a problem in windows mdi form application.how can we know a child form is exist or not. in mdi form i have taken toolstripmenuitem.in that click event i was trying to show a child form1 when we click that menu item for that i am using show method.but when click second time the new child form1 is created.i want show that child only once.if its already it must be restored.how can restore the child form1 if its already exists .and how can we if child form is exist or not. thanks in advance regards obalesu n

      D Offline
      D Offline
      darkelv
      wrote on last edited by
      #2

      See an answer for a similar question here: MDI Form[^]

      N 1 Reply Last reply
      0
      • D darkelv

        See an answer for a similar question here: MDI Form[^]

        N Offline
        N Offline
        Naresh123456789
        wrote on last edited by
        #3

        thanks for reply, but i could't understand that code .please send cleary. regards obalesu

        J 1 Reply Last reply
        0
        • N Naresh123456789

          thanks for reply, but i could't understand that code .please send cleary. regards obalesu

          J Offline
          J Offline
          Joachim Kerschbaumer
          wrote on last edited by
          #4

          you could do something like the following in your clicked_handler. it goes through all mdi childforms....if the one you are trying to open is already opened, it activates the windows and returns. if it's not found, it creates a new mdi childform. foreach (Form f in this.MdiChildren) { if (f.Name.Equals("mySubForm")) { f.Activate(); return; } } mySubFormn f= new mySubForm(this); f.MdiParent = this; f.Show();

          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