•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 423,535 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,349 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 1117 | Replies: 2
![]() |
•
•
Join Date: Jul 2007
Posts: 175
Reputation:
Rep Power: 2
Solved Threads: 16
At runtime I want to check if a certain form is open. I know how to check if a form is open.
I do it like this(where form1 and form2 contain the names of the form)
My problem is I want to check if any copy of these forms are open and those would have different names?
I do it like this(where form1 and form2 contain the names of the form)
For Each fForm In Forms
If fForm.Name = Form1 Or fForm.Name = form2 Then
proramm_running = True
Exit Sub
End If
NextMy problem is I want to check if any copy of these forms are open and those would have different names?
Last edited by plusplus : Dec 24th, 2007 at 2:19 am.
•
•
Join Date: Mar 2005
Location: Phnom Penh, Cambodia
Posts: 410
Reputation:
Rep Power: 5
Solved Threads: 36
•
•
•
•
My problem is I want to check if any copy of these forms are open and those would have different names?
There are several collection objects that you can reference in your project in Visual Object: one is the forms collection.
Use the For Each with the Forms collection to cycle through the forms.
Try this in a sub routine.
Dim frm as form For each frm in Forms debug.print frm.Name next
I just accessed one property here. But you extract whatever property you would like during the For Each loop.
Hank
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
3d agplv3 apple blue screen cocoa computer crash dell development drivers firefox framework games gnu gpl graphics ibm intel internet java linux microsoft microsystems mozilla news next open open source open-source opengl openoffice operating os programming red hat rhel saas software source sourceforge step sun super support system ubuntu vista wesnoth windows xp
- How to check if form is open (Visual Basic 4 / 5 / 6)
- problem with toolbar,menubutton click (Visual Basic 4 / 5 / 6)
- asp:repeater in a form? (ASP.NET)
- owner form display problem (VB.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: passing data between forms
- Next Thread: help


Linear Mode