StrataFrame Forum
Back
Login
Login
Home
»
.NET Forums
»
General .NET Discussion
»
Iterate through all forms in a project...
Iterate through all forms in a project...
Post Reply
Like
1
Iterate through all forms in a project...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
StarkMike
StarkMike
posted 18 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 436,
Visits: 944
I can't seem to find out how to iterate through all the forms in a VB project. Why does this seem so difficult to do? I'm aware of the OpenForms property but I cant really open ALL the forms in my project just to iterate through them.
I can even find out how to reference a form if i have the name:
dim frm as form = Forms("Form1")
Anybody got any advice?
Reply
Like
1
Reply
Trent Taylor
Trent Taylor
posted 18 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
If you are using an MDI environment then you can use the forms collection of the MDIClient as shown below.
Dim loForm As System.Windows.Forms.Form
Dim llReturn As Boolean = False
For Each loForm In MyMDI.MdiChildren
If loForm.GetType() Is FormType
llReturn = True
'-- Place your code here
End If
Next
Return llReturn
End Function
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Iterate through all forms in a project...
StarkMike
-
18 Years Ago
Check out the My.Forms object (VB thingy). This should have a...
Greg McGuffey
-
18 Years Ago
Yeah, this confused me for a bit too.
You need to use...
Greg McGuffey
-
18 Years Ago
Thanks Greg! I appreciate the info, i just dont understand why it has...
StarkMike
-
18 Years Ago
Well, I think that its more complicated because everything...
Greg McGuffey
-
18 Years Ago
If you are using an MDI environment then you can use the forms...
Trent L. Taylor
-
18 Years Ago
Hi Guys, This may (or not) help but we use DevExpress and I wanted a...
Peter Jones
-
18 Years Ago
Thanks guys for all your input. WOW! Its been a BIG help. P.S. Peter,...
StarkMike
-
18 Years Ago
I'm not sure why the OpenForms property doesn't work for you... the...
StrataFrame Team
-
18 Years Ago
Post Reply
Like
1
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search