How to close child windows??
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
I'm working on a note control. I have some pop up windows by doing .showdialog. Is there anyway I can do if I close the parent form, all the popup(child forms) will close as well? Thank
If you call
ShowDialog()
with the parameter filled in, your Dialog will have a parent. If the Dialog form has a parent, if the parent gets closed, the dialogs will also close. It's simple enough to do, just tellShowDialog
which form is the parent form, usually "Me":Dim myDialog As New DialogForm2 myDialog.ShowDialog(Me)
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome