We need to use a previously developed .NET application with a existing
VC++/MFC application. Idea is to convert the .NET application to an ActiveX
control which can be inserted in the ActiveX Container Application. However
there seems to be no way to do this.
A .NET component without a GUI can be used by COM application, but there is
no mention of the control with a GUI. Anyone has any idea how to do this?
pmoore - 24 Nov 2004 19:25 GMT
the supported mechanism is to host the control inside IE and then host IE in
your app
for the unsupported way see adam nathan com interop book p 471
> We need to use a previously developed .NET application with a existing
> VC++/MFC application. Idea is to convert the .NET application to an ActiveX
> control which can be inserted in the ActiveX Container Application. However
> there seems to be no way to do this.
> A .NET component without a GUI can be used by COM application, but there is
> no mention of the control with a GUI. Anyone has any idea how to do this?
Eckhard Schwabe - 26 Nov 2004 17:40 GMT
Hello Ramchandra,
Ramchandra Hegde schrieb:
> We need to use a previously developed .NET application with a existing
> VC++/MFC application. Idea is to convert the .NET application to an ActiveX
> control which can be inserted in the ActiveX Container Application. However
> there seems to be no way to do this.
> A .NET component without a GUI can be used by COM application, but there is
> no mention of the control with a GUI. Anyone has any idea how to do this?
There is some code and an example at:
http://msdn.microsoft.com/msdnmag/issues/03/03/windowsforms/
"Managed Controls in Unmanaged Hosts"
the drawbacks are:
- the host has to be compiled as managed code
- this works with VC++ 2003 or newer
- it has to use MFC
But it seems to work. I could reproduce the example with my own C#
windows forms control.
Ecki