How to use ocx in VB

Posted on 2006-06-05
Last Modified: 2010-04-07
Hi All,

I developed a ocx control on VB.Net and I want to use it with VB exe.How can I do that.Please help me
Question by:hansol5
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    simply add the .ocx in the project components, and it will appear in the components toolbox, where you can take it as any other control
    LVL 8

    Expert Comment

    LVL 69

    Expert Comment

    by:Éric Moreau
    Hi hansol5,

    > I developed a ocx control on VB.Net

    How? VB.Net is not able to compile a OCX file. If you created a user control in VB.Net, this one cannot be hosted on a VB6 form.    


    Author Comment

    Yes emoreau,

    I created the user interface in .net.My other application is in VB6.And I have to use that control in VB62 Application.Is thr any way to do that.
    LVL 69

    Accepted Solution

    VB6 cannot use controls created by .Net.
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    Accept: emoreau
    >VB6 cannot use controls created by .Net.

    Featured Post

    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!

    Join & Write a Comment

    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…
    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…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now