Solved

A form in an ActiveX

Posted on 2004-04-01
3
162 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…

910 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

22 Experts available now in Live!

Get 1:1 Help Now