WinForms User Control In VB6 App

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I have developed a set of User Controls for an application that we would now
like to backfill into a VB6 application. I believe that it is possible to
create an ActiveX control out of the User Control and embed it in a
WebBrowser, but I haven't found any good examples of this. Could anybody
point me to one?

Alternatively, if anybody has any better solutions, I'd be very happy to
hear them.

Thanks,
PAGates
 
PAGates,

Unfortunately, there is no supported way of exposing a .NET control as
an Active X control. You can embed a .NET control into IE (or a webbrowser
app), but doing that just to expose it to VB is a HUGE waste of resources.

There is an unsupported way of exposing .NET controls as ActiveX
controls, but I wouldnt base code released into production on it.

You are probably better off migrating the other parts of your VB6 app to
..NET.

Hope this helps.
 
Hi Nicholas,

Unfortunately, my pleas to upgrade the existing stuff fell on deaf ears, so
we must somehow integrate the control into the VB6 stuff. Believe me, I
tried!

I understand that it is a waste, but if embedding it is the "only" way
(unless you can point me to the unsupported way), then that's what I will be
forced to do.

The risk is low - the control is basically a browsing tool on a client to
get tags from a database. It should not interfere with any "real" production
on the system.

Thanks,
PAGates

Nicholas Paldino said:
PAGates,

Unfortunately, there is no supported way of exposing a .NET control as
an Active X control. You can embed a .NET control into IE (or a webbrowser
app), but doing that just to expose it to VB is a HUGE waste of resources.

There is an unsupported way of exposing .NET controls as ActiveX
controls, but I wouldnt base code released into production on it.

You are probably better off migrating the other parts of your VB6 app to
..NET.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

pagates said:
Hi All,

I have developed a set of User Controls for an application that we would
now
like to backfill into a VB6 application. I believe that it is possible to
create an ActiveX control out of the User Control and embed it in a
WebBrowser, but I haven't found any good examples of this. Could anybody
point me to one?

Alternatively, if anybody has any better solutions, I'd be very happy to
hear them.

Thanks,
PAGates
 
Back
Top