Can custom .Net elements be used in VB6 form?

I am doing some maintenance in a VB6 Windows application. I have a .Net user control component that I would like to use in VB6 form. Is it possible? I know how to access non-visual .Net components from VB6 by creating a COM type library for the .Net DLL, but can user .Net control like .OCX from VB6 be used? If so, how is the control instantiated in VB6, added to the form, etc.

Thanks in advance for any answers.

+4
source share
2 answers

Interop Forms Toolkit will provide you with what you need:

http://msdn.microsoft.com/en-us/vbasic/bb419144.aspx

It allows you to create UserControls in VB.net, which can then be added to VB6. It also allows you to display .net forms from your VB6 code.

I have successfully used it to give old VB6 code. .net toolbars - much nicer!

+7
source

This will lead you step by step to the process.

http://www.codeproject.com/KB/vb-interop/UsingDotNETControlsInVB6.aspx

This is not ideal, so you will have to examine how much your limitations affect you.

+3
source

All Articles