Problem solve Get help with specific problems with your technologies, process and projects.

How can I restrict my child form from opening more than once in MDI in VB.NET?

How can I restrict my child form from opening more than once (I want to restrict multiple instance of a form) in MDI in VB.NET?
There's no direct way to check if a particular form is loaded. One way to solve the problem is to create a static property in the form class and set that static variable to true when you load the form and when you close the form, set it to false. Of course you'll have to handle the Loaded and Closed events to properly set the static variable. If you want to get the instances of the loaded forms, you could have a static array that you add and remove form instances to, you could do that as well.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.