Solved

Names of Forms Loaded

Posted on 2002-06-13
6
191 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 50

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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 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