Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.

Dodge

Grab Life By The Horns

Posted

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:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...