Dodgeram01 Posted September 23, 2002 Posted September 23, 2002 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. Quote Dodge Grab Life By The Horns
Guest Ordos0 Posted September 23, 2002 Posted September 23, 2002 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: Quote
*Gurus* Derek Stone Posted September 24, 2002 *Gurus* Posted September 24, 2002 You should be opening the about form modally. AboutForm.ShowDialog() Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.