Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI Form Duplicates

Status
Not open for further replies.

Akart

IS-IT--Management
Nov 14, 2002
71
0
0
AU
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
 
Hi if the form should open as a msgbox then do this
NewMDIChild.ShowDialog()
And the mail form will be locked till you close the MDi form

Good Luck
Chaim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top