By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,709 Members | 1,650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,709 IT Pros & Developers. It's quick & easy.

is it possible to create Activex Component using c#.net? If yes then how to create it?<EOM>

P: n/a


Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
check out the following:

http://www.codeproject.com/cs/miscct...etcontrols.asp

HTH

Ollie Riches

"B Deepak" <de**********@persistent.co.in> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...

Nov 17 '05 #2

P: n/a
No it's not possible to author ActiveX controls in C#, there is however a
possibility to 'expose' Window Forms controls as ActiveX controls through
the CLR COM interop layer. Note that while the CLR doesn't offer all
features of "full controls "(see OC96 specs.) WF controls can be exposed as
ActiveX controls in ActiveX containers like IE and Office.
Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...

Nov 17 '05 #3

P: n/a
Hi Willy,

Do ur workaround allow me to fire regsvr32 command on the dll?
If yes, then I have to use this registered dll as excel RTD server.

Waiting for reply...
Thanks,
Deepak

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eG*************@TK2MSFTNGP10.phx.gbl...
No it's not possible to author ActiveX controls in C#, there is however a
possibility to 'expose' Window Forms controls as ActiveX controls through
the CLR COM interop layer. Note that while the CLR doesn't offer all
features of "full controls "(see OC96 specs.) WF controls can be exposed
as ActiveX controls in ActiveX containers like IE and Office.
Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...


Nov 17 '05 #4

P: n/a
You don't need regsvr32, you need to include the functions to register the
UC as an "AX control" in the registry as explained in the article pointed to
by Ollie, when done you should register the assembly as COM callable using
regasm.exe, or by setting the project property "register for COM interop".
Note that exposing .NET to COM clients requires .NET to be installed!.

Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
Hi Willy,

Do ur workaround allow me to fire regsvr32 command on the dll?
If yes, then I have to use this registered dll as excel RTD server.

Waiting for reply...
Thanks,
Deepak

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eG*************@TK2MSFTNGP10.phx.gbl...
No it's not possible to author ActiveX controls in C#, there is however a
possibility to 'expose' Window Forms controls as ActiveX controls through
the CLR COM interop layer. Note that while the CLR doesn't offer all
features of "full controls "(see OC96 specs.) WF controls can be exposed
as ActiveX controls in ActiveX containers like IE and Office.
Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...



Nov 17 '05 #5

P: n/a
Hi Willy,

Thanks for your valuable help.
I simply created a class library in c# project and inside configuration
prpoerties tab, i checked for "register for COM interop".
Does it solve my pb? Because I have to create a "excel RTD server" and for
this dll should be of activex dll type.

Regards,
Deepak
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
You don't need regsvr32, you need to include the functions to register the
UC as an "AX control" in the registry as explained in the article pointed
to by Ollie, when done you should register the assembly as COM callable
using regasm.exe, or by setting the project property "register for COM
interop".
Note that exposing .NET to COM clients requires .NET to be installed!.

Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
Hi Willy,

Do ur workaround allow me to fire regsvr32 command on the dll?
If yes, then I have to use this registered dll as excel RTD server.

Waiting for reply...
Thanks,
Deepak

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eG*************@TK2MSFTNGP10.phx.gbl...
No it's not possible to author ActiveX controls in C#, there is however
a possibility to 'expose' Window Forms controls as ActiveX controls
through the CLR COM interop layer. Note that while the CLR doesn't offer
all features of "full controls "(see OC96 specs.) WF controls can be
exposed as ActiveX controls in ActiveX containers like IE and Office.
Willy.

"B Deepak" <de**********@persistent.co.in> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...



Nov 17 '05 #6

P: n/a

"B Deepak" <de**********@persistent.co.in> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
Hi Willy,

Thanks for your valuable help.
I simply created a class library in c# project and inside configuration
prpoerties tab, i checked for "register for COM interop".
Does it solve my pb? Because I have to create a "excel RTD server" and for
this dll should be of activex dll type.

Regards,
Deepak


If your only need is to use the RTD function in Excel, then, all you have to
do is to expose the .NET class as a COM server, and all you have to do in VS
is to register for COM interop and pay attention to the specific
requirements impossed by COM clients, please search MSDN for details on "COM
interop".

Note that this has nothing to do with "ActiveX controls", and as such has
nothing to do with the article Ollie pointed to.

Willy.
Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.