vb.net 未能创建组件“AxHost”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28655398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 18:49:36  来源:igfitidea点击:

Failed to create component 'AxHost'

.netvb.netvisual-studio-2012axshockwaveflash

提问by Azam Alvi

I am using Visual Studio 2012 Ultimate. I simply create a new Windows Application form, now when I move Shockwave Flash Objectto my form I received the error Failed to create component 'AxHost'. I also download and install the Visual Basic 2010 and same thing is happening there.I also installed the latest .Net 4.5. What is missing in my PC or in my Project?

我正在使用 Visual Studio 2012 Ultimate。我只是创建了一个新的 Windows 应用程序表单,现在当我移动Shockwave Flash Object到我的表单时,我收到了错误Failed to create component 'AxHost'。我还下载并安装了 Visual Basic 2010,那里也发生了同样的事情。我还安装了最新的 .Net 4.5。我的 PC 或我的项目中缺少什么?

enter image description here

在此处输入图片说明

采纳答案by Azam Alvi

I found it's solution. I just rename the file Flash64_16_0_0_305.ocxto Flash32_16_0_0_305.ocxand then run both command in cmd

我找到了解决方案。我只是重命名文件Flash64_16_0_0_305.ocxFlash32_16_0_0_305.ocx,然后运行CMD中两个命令

regsvr32 C:\Windows\SysWOW64\Macromed\Flash\Flash32_16_0_0_305.ocx  
regsvr32 C:\Windows\System32\Macromed\Flash\Flash32_16_0_0_305.ocx

and it's works fine.

它工作正常。

回答by kmatyaszek

To resolve this problem you should manualy register Flash ocx component.

要解决此问题,您应该手动注册 Flash ocx 组件。

To register ocx component you should use Regsvr32 (ms support):

要注册 ocx 组件,您应该使用 Regsvr32 ( ms support):

Regsvr32 [/u] [/s] <OCX File Name>

Regsvr32 [/u] [/s] <OCX 文件名>

Flash ocx file path is typically:

Flash ocx 文件路径通常为:

C:\Windows\System\Macromed\Flash (Windows 95, 98, WinME) C:\WinNT\System32\Macromed\Flash (Windows NT, 2000) C:\Windows\System32\Macromed\Flash (Windows XP, Vista, 7) C:\Windows\SysWOW64\Macromed\Flash (Vista, 7)

C:\Windows\System\Macromed\Flash(Windows 95、98、WinME) C:\WinNT\System32\Macromed\Flash(Windows NT、2000) C:\Windows\System32\Macromed\Flash(Windows XP、Vista、 7) C:\Windows\SysWOW64\Macromed\Flash (Vista, 7)

Example:

例子:

 regsvr32 C:\Windows\System32\Macromed\Flash\flash.ocx