Hi Martin,
The way used in VS .NET add-ins is to host a usercontrol with a so-called
'shim control'. The shim control is a small ActiveX written in unmanaged
C++, and is available either from Microsoft (somewhere in the Visual Studio
extensibility area of the Microsoft website), or, an alternative version is
available in the file archive of the following forum:
http://groups.yahoo.com/groups/vsnetaddin
So you import the shim control to the legacy environment and then tell the
shim control to host the actual .NET user control.
As for the whisper, .NET user controls DO implement a subset of ActiveX
interfaces (well, at least it was true for .NET Framework 1.0), so you could
register them as regular OCXes and they even might have worked this way.
But, still, this is trickery so nobody can guarantee it would work without
any hassle.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"Martin Platt" <Ma*********@discussions.microsoft.com> wrote in message
news:AE**********************************@microsof t.com...
Hi,
I'd like to make my C# usercontrol appear as an OCX does, so that I can
import and use in a legacy environment. Is this possible? I hear a whisper of being able to put some registry
values in, to make it work, so would there be attributes that do the same
thing properly??
any help would be highly appreciated.
Regards,
Martin Platt.