?
Solved

Reference running dll form from running exe

Posted on 2005-03-14
3
Medium Priority
?
171 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

612 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