?
Solved

Reference running dll form from running exe

Posted on 2005-03-14
3
Medium Priority
?
168 Views
Last Modified: 2010-05-02
How do I/Can I:

1)  Reference form A running in ActiveX dll from standard VB EXE?
        - Dll is referenced in EXE and form A is active.  
2)  Call methods of that form A from the EXE.

0
Comment
Question by:dhilldj
[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
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
Marv-in earned 1000 total points
ID: 13540339
1) you can do somthing like this to reference the form - if you need a more solid example let me know
in the exe that you want to reference the dll
dim obj as object
set obj = createobject("<dllname>.<classname>")
obj.ShowFormA

in the activex dll you need a class with the function ShowFormA
publuic function ShowFormA
 FormA.Show
end function

2) all function that you call should be public members of the class - that way your exe can call them and the class can interact with the form
0
 
LVL 6

Expert Comment

by:Marv-in
ID: 13540353
are you looking to do a plugin type interface?

here is a good explaination:
http://www.sandsprite.com/CodeStuff/Understanding_plugins.html
0
 

Author Comment

by:dhilldj
ID: 13540628
Thanks for the response Marv.  Already implemented a very similar solution that does work.  

DJ
0

Featured Post

Independent Software Vendors: 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!

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

762 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