Prevent Multiple Copies of Forms From Opening?

Dodgeram01

Freshman
Joined
Apr 9, 2002
Messages
41
Location
Upstate NY
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.
 
a suggestion

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

:cool:
 
Back
Top