tmighty
tmighty

Reputation: 11399

VB6 OCX not showing up in VS2010 toolkit

I am currently trying to use a VB6 ocx in a VB.NET project, but I just don't remember anymore how I managed to do it (I was using VS2008, I think, now I am using VS2010).

I clicked "Project", "Add Reference...", "COM" and then selected my OCX and clicked "Ok".

If I remember correctly, it showed up in the toolbox right away and worked. I could drag it onto my form.

But now I do not see the OCX in the toolbox anymore.

Thank you very much for the help!

Upvotes: 0

Views: 1228

Answers (1)

Hans Passant
Hans Passant

Reputation: 942020

Project + Add Reference doesn't add controls to the toolbox. An extra step is required to auto-generate the AxHost wrapper for the control, something you can do by hand by running the AxImp.exe utility.

Instead, right-click the toolbox, Choose Items and use the COM tab. Or use the Browse tab if the .ocx file didn't register its type library or you don't know the name of the library.

Upvotes: 2

Related Questions