T
Tony K
I have a MDI application. On the menu toolstrip child forms are selected
from one of the menus. I don't want to play the disable/enable menu item
game. I have selected that open forms are added to the "Window" menu item.
What I'm looking for is when the user clicks on the menu item to open the
form, how can I check to see if it's open already and if so then set the
focus (if possible).
What happens now is if the menu item is clicked on 2, 3 or even 4 times, it
opens new instances of the form each time.
What can I change in this code that opens my child forms to prevent it from
opening new instances?
Dim frmCustomers As New Customers()
frmCustomers.MdiParent = Me
frmCustomers.WindowState = FormWindowState.Maximized
frmCustomers.Show()
Thanks,
Tony
from one of the menus. I don't want to play the disable/enable menu item
game. I have selected that open forms are added to the "Window" menu item.
What I'm looking for is when the user clicks on the menu item to open the
form, how can I check to see if it's open already and if so then set the
focus (if possible).
What happens now is if the menu item is clicked on 2, 3 or even 4 times, it
opens new instances of the form each time.
What can I change in this code that opens my child forms to prevent it from
opening new instances?
Dim frmCustomers As New Customers()
frmCustomers.MdiParent = Me
frmCustomers.WindowState = FormWindowState.Maximized
frmCustomers.Show()
Thanks,
Tony