Solved

Using ActiveX in VB

Posted on 2002-05-22
9
155 Views
Last Modified: 2010-05-02
How do I embed an ActiceX object inside a VB project (in this case OCX that is a rapper to few AxtiveX objects)?
0
Comment
Question by:alto
9 Comments
 
LVL 3

Expert Comment

by:MCummings111400
ID: 7028042
Are you trying to embed the OCX file inside your EXE? or just be able to use the OCX Controls in your Project?
0
 
LVL 1

Expert Comment

by:tandrei
ID: 7028975
There are two ways  to do this:
  1. in a static way, by simply adding the OCX to your form as a component (you will be able to catch all the events, but any modification of the ocx will lead to reinclude the ocx into your progam and rebuild)
  2. in a dynamic way using the VB Controls array of components,but in this way you won't be able to catch events ( I mean those user defined events)
 Please be more specific to get more help from me
Regards, tandrei
0
 

Author Comment

by:alto
ID: 7028987
What I need is to embed an ActiveX (that is not OCX) into a VB project(in my case OCX, but it can be any other VB project like exe)
How to embed an OCX I know, my question is how to embed an ActiveX componnent that is not an OCX.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7029013
The only other ActiveX component is an ActiveX DLL.
You can add this by adding a reference to it
If you have the source just load the .vbp file into your project, so you get a project group
0
 

Author Comment

by:alto
ID: 7029040
One of the ActiveX I need to embed is the NetMeeting.
If I add the line:
'<object ID=NetMeeting CLASSID="CLSID:3E9BAF2D-7A79-11d2-9334-0000F875AE17"></object>' to html file I get the full UI interface of the NetMeeting on my explorer.
I want to add that UI to a VB project also, When I add a reference to the NetMeeting lib I get only few methods of the NetMeeting Scripting API.
 
0
 
LVL 2

Expert Comment

by:priya_pbk
ID: 7029047
See there are 2 things,
1)"OCX" which has a visual interface. These ActiveX controls are customised controls made by anybody who wants some extra functionalities other than a usual/defualt properties for a control.
eg: I can make my own textbox known as "CoolTextBox" which will default properties of Vb Textbox plus some extra properties say, a property to accept uppercase, lowercase, numbers or characters etc.
These ActiveX controls after being made are complied to what we call as "ocx controls" ie in this case it will be "cooltextbox.ocx"
This has to be registered in your pc before using it. Once this is done, you can open your standard exe VB project, go to Projects Menu, Components and choose your ocx control. When this is done you can see the ocx control in the toolbox. This way you can use the ActiveX control in your vb project

2) The other ActiveX is the ActiveX DLL, which does not have an interface. Here you can have your own functions and methods which can be used in other projects. After doing this compile the ActiveXDLL project to make "Test.dll". Register it and this also can be used in your project by going to Project Menu, References and selecting the test.dll. Then when you create an object of this dll in your project, you can see all the functions and methods of the dll.

Hope this info helps!

Priya

0
 
LVL 3

Expert Comment

by:MCummings111400
ID: 7039599
Try This.

Right click on your toolbox,
Select Components,
Click Browse....
Locate the Netmeeting  DLL
Click ok.
One of the netmeeting DLL's will contain the UI UserControl. Onec you find the right one, you'll get the control in your toolbox.

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7818404
Hi alto,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

alto, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7909875
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 102
Add and format columns in vb6 7 56
Help me. 3 54
Sub or Function is not defined 6 26
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

776 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