Solved

Using ActiveX in VB

Posted on 2002-05-22
9
154 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
 
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
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.

 

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

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

Suggested Solutions

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now