• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Names of Forms Loaded

Hi experts,

Do anybody know how to find which are the forms opened from the DLL. I have a Visual Basic project which is referenced to A.DLL, I want to find which are the forms opened in the project , but i have the function in DLL.

Your help is very much appreciated.

Thanking you
0
vksharath
Asked:
vksharath
1 Solution
 
Ryan ChongCommented:
How you open a form from your DLL?

Basically, we can look what forms are loaded by using code below:

Dim frm As Form
For Each frm in VB.Forms
   Debug.Print frm.Name
Next

cheers
0
 
TasneemCommented:
Forms.Count will give you no of forms open and then you can use what ryancys says.
Regards
0
 
gencrossCommented:
The above code is not going to work from a DLL.  This will only work in the project the forms are loaded in.  I will see if I can come up with something...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
gencrossCommented:
I assume you are making your dll from the VB app.  When you make the call pass the VB.Forms collection

call objTest.TestCount (VB.Forms)

dll call...

Sum TestCount( frms as Object)

Dim frm As Form
For Each frm in frms.Forms
  Debug.Print frm.Name
Next

End Sub

This should work.
0
 
DanRollinsCommented:
Hi vksharath,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept gencross's comment(s) as an answer.

vksharath, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now