F
federico
Hello, every time I click on the button to open the child form, the form
opens fine, but if I click the button again, the same form opens again. I
would like to limit to one instance each particular form. I thought a would
add a condition to the code for the new form bottom click event (below), but
I don't know how to check to see if the form is already open. Could anyone
please help?
federico
Private Sub tbrMain_ButtonClick(ByVal sender As System.Object, ByVal e As _
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
tbrMain.ButtonClick
Dim NewMDIChild As New frmHardware
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub
opens fine, but if I click the button again, the same form opens again. I
would like to limit to one instance each particular form. I thought a would
add a condition to the code for the new form bottom click event (below), but
I don't know how to check to see if the form is already open. Could anyone
please help?
federico
Private Sub tbrMain_ButtonClick(ByVal sender As System.Object, ByVal e As _
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
tbrMain.ButtonClick
Dim NewMDIChild As New frmHardware
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub