无法使用Windows窗体中的OCX控件 [英] unable to use the OCX controls in the windows form

查看:84
本文介绍了无法使用Windows窗体中的OCX控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当我尝试以表格形式添加用户定义的控件时.

我已经在Regsvr32中注册了相同的文件.

仍然出现以下错误.

请指导我解决此问题.

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.

---------------------------
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   
---------------------------

推荐答案

按照以下说明

1)前往解决方案资源管理器
2)选择您的项目
3)右键点击项目
4)选择添加参考
5)找到(浏览)您的控件OCX文件
6)确定
您的控件将以用户控件的名称重新出现在工具箱中.
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


您好,.

试试这个..,

1.右键单击工具箱窗口.
2.点击选择项目"
3.选择通讯组件"选项卡.
4.浏览您的OCX控制文件.
5.完成.您将在工具箱中获得该控件
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


这篇关于无法使用Windows窗体中的OCX控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆