Solved

Names of Forms Loaded

Posted on 2002-06-13
6
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 52

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 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