473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Make C# usercontrol appear as proper activeX, like OCX??? Microsof

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.
Nov 16 '05 #1
1 2028
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.


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Kate | last post by:
Hi: I have a form with a picture box and some command buttons to make certain shapes appear in the picture box. The shapes are drawn on blank UserControls added like this: 'at top of form...
0
by: BestNews | last post by:
OS: XP ..Net= framework = 1.0.3705 VS.Net IDE = 7.0.9466 1. I used an ActiveX control in C# client Application. After executing Aximp of ActiveX control. I derived a class from the AxHost.
4
by: james | last post by:
I cannot get my UserControl's browsable properties to show up in the designer properties panel. I have then public virtual bool TestProp { {get return testProp; } set { testProp = value; } } ...
4
by: Dennis Burdett | last post by:
I have a pretty complex control which use to be a C# windows form that I am trying to make into a control that can be dragged onto a VB6 form. I was able to make it into a com class that I could...
2
by: Noozer | last post by:
This is a stupid question, I know, but I can't figure it out... Someone please embarass me. I have a solution that has a number of usercontrols included. When I add a usercontrol project to...
4
by: Tim B | last post by:
Hi, Previously I was loading my .NET Usercontrol like this : <OBJECT id="Obj" classid="Viewer.dll#Viewer.Viewer" width=105 height=20 VIEWASTEXT><param name="DONOTHING" value="1"> </OBJECT> ...
0
by: Mark | last post by:
I am converting a VB6/COM application to VB.NET and must remove all COM objects. VB6/COM App Architecture: Windows Form hosts WebBrowser which loads HTML snippets from local disk. Some of the...
1
by: Soren S. Jorgensen | last post by:
Hi, What would it take to put a .NET usercontrol (System.Windows.Forms.UserControl) on a CPropertyPage ?? I can expose the .NET usercontrol to MFC as a ActiveX component (implementing...
1
by: sandeepdhankar10 | last post by:
hi experts.... i need ur help again... i am creating a usercontrol that fetch images from webservice and show in a picture box.. (This is my Activex control as i say). and build it. now i have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.