Solved

A form in an ActiveX

Posted on 2004-04-01
3
161 Views
Last Modified: 2010-05-02
Hi,

I've busted my but on this to no avail.

I want to put a form in an activeX and call it.

Should I create a dll or ocx? if a dll, how do I load it in my program?
0
Comment
Question by:StevenJames
3 Comments
 
LVL 9

Accepted Solution

by:
dancebert earned 125 total points
ID: 10737761
Create a project of type ActiveX Dll (myProject).  Include a class (myClass) with a Public Sub (mySub).  Set the INstancing property of myClass to '5-multiuse'.  Add a form to the project.  In mySub put the code to show the form.  

Add another project (CallingProject) to the project group, this time of type Standard EXE.  Add a reference to myProject.  Somewhere in CallingProject, do something like this

dim o as myProject.myClass
set o = new myClass
o.MySub


0
 
LVL 3

Expert Comment

by:santosh26676
ID: 10738570
Yes I agree with dancebert. You could actually build the complete module (this is just for understanding purpose) and add as many form as you want. Just create the instance of the class (DLL) in the calling program and call the functions. Each function in DLL will perform some operations ( may be some calculations or loading a user interface).

0
 
LVL 4

Author Comment

by:StevenJames
ID: 10742072
Friggin beautiful man.

Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now