Windows Develop Bookmark and Share   
 index > Windows Forms General > How to register a winforms control as ActiveX control?
 

How to register a winforms control as ActiveX control?

I strictly followed this guide (http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx) to build a custom winform control, but I failed with "regsvr32 my.dll".

I googled for a while, however, ended up with nothing.

Could someone help me on this task?

thanks.

btw, the above sample code didn't work for me, too.
Lunar Fifth  Friday, April 24, 2009 9:49 AM
ComVisible .NET assemblies are not registered with Regsvr32.exe, they require Regasm.exe.
Hans Passant.
  • Marked As Answer byLunar Fifth Monday, April 27, 2009 2:59 AM
  •  
nobugz  Friday, April 24, 2009 12:50 PM
ComVisible .NET assemblies are not registered with Regsvr32.exe, they require Regasm.exe.
Hans Passant.
  • Marked As Answer byLunar Fifth Monday, April 27, 2009 2:59 AM
  •  
nobugz  Friday, April 24, 2009 12:50 PM

Sorry for late reply.
It works fine.

But I got bunch of warnings like below,

Warning: Non COM visible value type 'System.Windows.Forms.AnchorStyles' is being referenced either from the type currently being exported or from one of its base types.
Warning: Non COM visible value type 'System.Windows.Forms.AutoValidate' is being referenced either from the type currently being exported or from one of its base types.
...

How to get rid of these warnings?

Thanks.

Lunar Fifth  Monday, April 27, 2009 2:55 AM

Another question,

I usually use ActiveX Control Pad to create a simple web page to test my control, but this time, for winform control, when I inserted it, I got error messge "Failed to create object. Make sure the object is entered in the system registry."

I didn't understand what situation I was in, if it's not in registry, how could I find it in control list? What shoud I do towrite a web page including this .NET ActiveX control?

thanks.

Lunar Fifth  Monday, April 27, 2009 3:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Panel printing in multiple pages C#
• How can i draw graphics in a picturebox
• Forms to fit monitors with different screen resolution
• ToolStripTextBox accept / validate in Context Menu
• Accessing a control from outside the form class (in form.h)
• Canno't move Form 1??
• Restrict access to some forms
• vb.net
• ToolStripPanel Layout Problem
• Windows Forms autotab