Closing form and form childs crisis!
-
Hi! I have a main form that handles several other child forms.The thing is that when i close the main form, and i want to close all of the child forms, it seems that the Main thread doesn't wait for the child forms to terminate.The main form calls Dispose() which destroys the mainUI first than the childs. Is this the correct procedure or do i have to destroy first the child forms and only then the mainUI? Thanks in advance. Never say never
-
Hi! I have a main form that handles several other child forms.The thing is that when i close the main form, and i want to close all of the child forms, it seems that the Main thread doesn't wait for the child forms to terminate.The main form calls Dispose() which destroys the mainUI first than the childs. Is this the correct procedure or do i have to destroy first the child forms and only then the mainUI? Thanks in advance. Never say never
Hi, - If the Form1 is a MainForm then (Form1 -> Property -> isMdiContainer=True) - I hope the below code will help U Private Sub CallForm2(...) Handles MenuItem2.Click Dim F2 As New Form2() F2.MdiParent = Me F2.Show() End Sub Private Sub CallForm3(...) Handles MenuItem3.Click Dim F3 As New Form3() F3.MdiParent = Me F3.Show() End Sub Private Sub CallExit(...) Handles MenuItem4.Click Application.ExitThread() End Sub With Regards PANDIAN S:)