Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using ActiveX in VB

Posted on 2002-05-22
9
156 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
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…

856 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