Solved

Using ActiveX in VB

Posted on 2002-05-22
9
153 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:alto
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

763 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

11 Experts available now in Live!

Get 1:1 Help Now