Solved

Names of Forms Loaded

Posted on 2002-06-13
6
172 Views
Last Modified: 2010-05-02
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
Comment
Question by:vksharath
6 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 7077447
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
 
LVL 4

Expert Comment

by:Tasneem
ID: 7078004
Forms.Count will give you no of forms open and then you can use what ryancys says.
Regards
0
 
LVL 4

Expert Comment

by:gencross
ID: 7078182
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Accepted Solution

by:
gencross earned 100 total points
ID: 7078248
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 7900263
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
 

Expert Comment

by:SpideyMod
ID: 7978188
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now