Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

When i tried to add a user defined control in the form.

I have registred the same with Regsvr32.

Still I am getting the following error.

Please guide me to resolve this.
C#
---------------------------
Microsoft Visual Studio
---------------------------
Failed to create component 'AxHost'.  The error message follows:
 'System.Runtime.InteropServices.COMException (0x800736B1): A wrapper assembly is not registered for this type library.
   at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)
   at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)
   at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)
   at System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)'
---------------------------
OK   
---------------------------
Posted
Updated 29-Dec-11 19:12pm
v4

follow the following instruction

1)go to solution explorer
2)select your project
3)right click on project
4)select add reference
5)locate(browse) your control OCX file
6)OK
your control will refelect into toolbox with the name of user control
 
Share this answer
 
Comments
valiant123 21-Dec-11 4:13am    
i have did the above steps and i am getting the ocx control in the tool box.
but i am not able to drag and drop the controls into the form.
when i am doing that i am getting the above error.
Rajesh Anuhya 30-Dec-11 1:10am    
see my answer
Hi..,

Try this..,

1. Right click on tool box window.
2. click on "Choose item"
3. select "Com COmponents" tab.
4. Browse your OCX Control file.
5. Done. you will get that control in tool box
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900