Solved

Names of Forms Loaded

Posted on 2002-06-13
6
196 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 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