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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Dynamically remove multiple innstances of child form from parent form

Dynamically remove multiple innstances of child form from parent form

Scheduled Pinned Locked Moved Visual Basic
hardwarehelpquestion
3 Posts 2 Posters 1 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.
  • S Offline
    S Offline
    sohaib_a
    wrote on last edited by
    #1

    Again an issue with the parent form-child form thing. I have two forms Form1 and Form2. Form1 is embedded as control in Form2. Multiple instances of Form1,each with a different name are open in Form2. I want to close all open instances of Form1 at the same time with the click of a button. How should i start?

    L 1 Reply Last reply
    0
    • S sohaib_a

      Again an issue with the parent form-child form thing. I have two forms Form1 and Form2. Form1 is embedded as control in Form2. Multiple instances of Form1,each with a different name are open in Form2. I want to close all open instances of Form1 at the same time with the click of a button. How should i start?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Loop through the controls of Form2, and check their type. if it is a form, close it. Shouldn't be harder then closing all types of control y within control x.

      S 1 Reply Last reply
      0
      • L Lost User

        Loop through the controls of Form2, and check their type. if it is a form, close it. Shouldn't be harder then closing all types of control y within control x.

        S Offline
        S Offline
        sohaib_a
        wrote on last edited by
        #3

        It worked.Thanks alot!!

        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