Using ActiveX in VB

How do I embed an ActiceX object inside a VB project (in this case OCX that is a rapper to few AxtiveX objects)?
altoAsked:
Who is Participating?
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
 
MCummings111400Commented:
Are you trying to embed the OCX file inside your EXE? or just be able to use the OCX Controls in your Project?
0
 
tandreiCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
altoAuthor Commented:
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
 
corvanderlindenCommented:
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
 
altoAuthor Commented:
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
 
priya_pbkCommented:
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
 
MCummings111400Commented:
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
 
DanRollinsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.