将 Adobe PDF Reader COM-Control 添加到 WinForm 失败
我尝试添加一个 COM 控件。我采取的步骤:
1.在工具箱中右键单击
2.选择COMComponents选项卡,然后出现“Adobe PDF Reader”
3.点击“确定”按钮
4. 现在尝试将 Adobe PDF Reader 控件拖放到 UserControl 中 -->失败并出现错误:
“无法创建组件“AxHost”。错误消息如下:“System.Runtime.InteropServices.COMException (0x80004005):未为此类型库注册包装器程序集。 在 System.Windows.Forms.Desgn.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost主机) 在 System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost 主机,IDictionary defaultValues) 在 System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost 主机,IDictionary defaultValues) 在 System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem工具,控件父级,Int32 x,Int32 y,Int32宽度,Int32高度,布尔hasLocation,布尔hasSize,ToolboxSnapDragDropEventArgse)'”
我现在能做什么?
提前感谢每一位回答。
问候,乔
i try to add a COM-Control. The steps i take:
1. right click in toolbox
2. choose COMComponents tab and there "Adobe PDF Reader"
3. click on "OK" button
4. Now trying to Drag&Drop the Adobe PDF Reader Control into an UserControl
--> Fails with error:
"Failed to create component 'AxHost'. The error message follows: 'System.Runtime.InteropServices.COMException (0x80004005): A wrapper assembly is not registrated for this type library.
at
System.Windows.Forms.Desgn.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 heigth, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgse)'"
What can i do now?
Thanks for every answere in advance.
Greetings, Joe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下操作
打开 Acrobat Reader |编辑|偏好 |互联网
选中在浏览器中显示 PDF 框,
您还必须使用 32 位设置 (x86) 进行调试
Try the following
Open Acrobat Reader | Edit | Preferences | Internet
Check the box Display PDF in browser
you will also have to debug using 32bit settings(x86)
在 Internet Explorer 中按照以下步骤为浏览器启用 pdf:https:// /helpx.adobe.com/acrobat/using/display-pdf-in-browser.html
答案与 Ahmads 相同,但新版本中的方法不同。
Enable pdf for browser by following these steps in Internet Explorer: https://helpx.adobe.com/acrobat/using/display-pdf-in-browser.html
Answer is the same as Ahmads but the method of doing it is different in newer versions.