简体   繁体   English

ActiveX-使用Windows 8在网页上托管Windows窗体控件

[英]ActiveX - hosting windows form control on web page using Windows 8

I am using activeX to host a windows form control on a web page but a cross icon is shown instead of that control on windows 8 IE. 我正在使用activeX在网页上托管Windows窗体控件,但显示的是十字图标,而不是Windows 8 IE上的该控件。 (I am not using metro IE ) The same web page hosted on a windows 7 works perfectly fine on IE. (我没有使用Metro IE)Windows 7上托管的同一网页在IE上运行正常。 Even both OS has same version of IE ie 10 甚至两个操作系统都具有相同版本的IE,即10

I am using the following sample code to load control on webpage 我正在使用以下示例代码在网页上加载控件

http://www.codeproject.com/Articles/4953/Simple-way-to-expose-a-NET-WinForm-control-as-an-A http://www.codeproject.com/Articles/4953/Simple-way-to-expose-a-NET-WinForm-control-as-an-A

Does Microsoft no longer Support hosting Windows form using Webpage? Microsoft不再支持使用网页托管Windows窗体吗?

Edited 已编辑

Here is the link of .dll file and .html file that im testing. 这是即时通讯测试的.dll文件和.html文件的链接。 It is working on windows 7 https://drive.google.com/folderview?id=0B7vQesjAiZYHWmVES29oWEh5WGM&usp=sharing 它可以在Windows 7上运行https://drive.google.com/folderview?id=0B7vQesjAiZYHWmVES29oWEh5WGM&usp=sharing

Microsoft announced that they were dropping support for ActiveX on Windows 8 . 微软宣布将放弃对Windows 8上ActiveX的支持 As a temporary way to allow support for web sites that require ActiveX, you can add an HTTP header to tell IE on Win8 to allow use of ActiveX. 作为支持需要ActiveX的网站的一种临时方法,可以添加HTTP标头以告知Win8上的IE允许使用ActiveX。

You need to add this header: 您需要添加以下标头:

X-UA-Compatible: requiresActiveX=true

This can be accomplished by settings on IIS or adding code to your pages . 这可以通过在IIS上进行设置或向页面添加代码来完成

Since you haven't stated which language you are using, I am going to provide C# WinForms. 由于您尚未说明要使用的语言,因此我将提供C#WinForms。

protected void Page_Load(object sender, EventArgs e)
{
    Response.AddHeader("X-UA-Compatible", "requiresActiveX=true");
}

应该在HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Wow6432Node \\ Microsoft.NETFramework中创建一个条目“ EnableIEHosting,DWORD = 1”,以便在Windows 8环境64位中的WebPage上承载Windows窗体控件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Web表单中使用Windows控件 - Using windows control in web form 在ASP.NET网页中托管Windows窗体用户控件 - Hosting Windows Forms user control in asp.net web page 如何在网页中打开Windows窗体控件? - how to open windows form control in a web page? 在Windows窗体中使用Sony ActiveX / OCX控件-在设计时起作用,而不是在调试/运行中起作用 - Using a Sony ActiveX / OCX Control in a Windows Form - works in design time, not in debug/run 在 windows 表单应用程序中托管交互式 web 服务 - Hosting an interactive web service in a windows form application 64位窗口中的ActiveX控件 - ActiveX Control in 64 bit windows Windows窗体WebBrowser控件显示网页,但innerHTML不包含网页上显示的文本 - Windows Form WebBrowser control shows a web page but innerHTML doesn't contain text shown on web page 具有ActiveX控件的Windows Form App仅在生产环境中不关闭子窗体 - Windows Form App with an ActiveX control not closing child-form in production environment only Windows 7上的Internet Explorer 6.0的IE ActiveX控件 - IE ActiveX control for internet explorer 6.0 on Windows 7 在Windows 8.1,IE 11中无法加载ActiveX控件 - ActiveX control not load in windows 8.1, IE 11
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM