Solved

A form in an ActiveX

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can i unlock a picture file that was loaded in a picturebox in visual c#? 4 105
passing a value with stream reader AFTER a ";" 3 74
Hide vba in gp 7 104
Advice in Xamarin 21 97
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 …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

828 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