What should one read into, or how would one prevent multiple copies of a form from being opened? For example, my program has an about form, and I don't want the user to be able to open multiple copies of it. Thanks.
Well, maybe you could declare a new variable, and if the user has opened the about menu, the variable is changed to 1, when, and only when, they have closed the about window, does the program change it back to 0. and if they try to open the about menu when it is already open, it won't let them because the value of the variable is 1. This is best accomplished with an If...Then statement.
Or you could have it so the command button to open the about menu is disabled while the about menu is open, for example:
(in the about form sub)
cmdAbout.Enabled = False 'The cmdAbout is representative of
'The command to open the About menu.
...
... 'The about menu code
...
cmdAbout.Enabled = True
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.