Hey folks,
I made a button that opens an mdi child form as follows:
Dim NewMDIChild As New Import()
NewMDIChild.MdiParent = Me.MdiParent
NewMDIChild.Show()
This works great for creating a new form class however, the form is added to the window drop down list of the mdi parent form (as required) which enables the user to select the original form and then click the button again creating a new class instance of the form and adding a duplicate form to the window list. (*phew puff pant)
So, my question is, how would i check to see if the form is already open and give it the focus rather than creating a new instance of the form each time.
Any help appreciated!
Regards,
Akart
I made a button that opens an mdi child form as follows:
Dim NewMDIChild As New Import()
NewMDIChild.MdiParent = Me.MdiParent
NewMDIChild.Show()
This works great for creating a new form class however, the form is added to the window drop down list of the mdi parent form (as required) which enables the user to select the original form and then click the button again creating a new class instance of the form and adding a duplicate form to the window list. (*phew puff pant)
So, my question is, how would i check to see if the form is already open and give it the focus rather than creating a new instance of the form each time.
Any help appreciated!
Regards,
Akart