Talk2Tom11
Centurion
Hello I have a question about parent child forms. I have form1 and form2. Form1 being the parent and 2 being the child. When I click a button in form1 it opens form2 in it. my problem is that if I click that button again it opens another instance of form2. What i want to do it only allow one instance of form2 to be opened at a time. my code for the button is below.
Visual Basic:
Dim NewMDIChild As New Form2()
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub