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.

This was first published in March 2004