stevecking
Active member
- Joined
- Dec 27, 2006
- Messages
- 32
- Programming Experience
- 5-10
I've a rather simply request but can't find the elegant solution. I want to be able to determine if a form is already open so another instance of the form isn't opened. If it's not open simply show it but if it is open I want to make it visible. I am aware that I can loop through the My.Application.OpenForms collection but I would assume that millions of developers would want this functionality and the the .NET 2.0 libraries supported it.
Form1 is open
Open Form2 and make Form1.Visible = False
Form2 is opened but being closed
If Form1 is open but not visible then
set the visible property to true
Else
Else open Form1
End If
Close Form2
Form1 is open
Open Form2 and make Form1.Visible = False
Form2 is opened but being closed
If Form1 is open but not visible then
set the visible property to true
Else
Else open Form1
End If
Close Form2