In VB6, there was a forms collection you could iterate to get a list of forms that were open in your application at runtime. I want to do something similar in vb.net. I have an MDI application. Several of the forms can have multiple instances, but one in particular, I only want the user to be able to only create one instance. If the form has already been created, but has been minimized or is in the background of another child form, I want to restore and/or bring it to the front.
In VB6, I would do something like:
bFormFound = False
For Each frm In Forms
If frm.Name = "myForm" Then
If frm.WindowState = vbMinimized Then frm.WindowState = vbNormal
bFormFound = True
If Not bFormFound Then
...create new instance here.
How would I replicate this code in VB.Net 2005?