Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDIChild windows 2

Status
Not open for further replies.

mixer

Programmer
Jan 11, 2000
14
0
0
US
I have an mdi app that allows users to open some mdichild windows multiple times, but other child windows I want to restrict to one instance. How can I interrogate the app to get the open children from any of the other child forms? Don't really want to use a bunch of global "I'm open" variables. Thanks, Dan
 
<br>
Try this code:<br>
<br>
Dim f As Form<br>
For Each f In Forms<br>
If f.Caption = &quot;Form1&quot; Then<br>
MsgBox &quot;form already loaded&quot;<br>
Exit Sub<br>
End If<br>
Next<br>
Set f = New Form1<br>
f.Show<br>

 
Thanks, I was trying to capture the windows handle and did not think of using the caption. This works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top