WebBrowser控件不支持Cursor属性。 [英] The WebBrowser control does not support the Cursor property.

查看:87
本文介绍了WebBrowser控件不支持Cursor属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Coders,



我在框架3.5,windows server 2008 r2操作系统中有windows应用程序。

这里一切正常。



后来我把应用程序移到了框架4,windows server 2012 r2操作系统。



这里在运行应用程序时,其投掷运行时错误如



Hi Coders,

I have windows application in framework 3.5, windows server 2008 r2 operating system.
Here everything works fine.

Later I have moved the application to framework 4, windows server 2012 r2 operating system.

here while running the application its throwing runtime error like

错误:

WebBrowser控件不支持Cursor属性。

"The WebBrowser control does not support the Cursor property."

完全在

__browser.Cursor = Cursors.WaitCursor;



我立刻看到事件查看器,它显示错误

exactly at
__browser.Cursor = Cursors.WaitCursor;

Immediately I saw the event viewer, it is showing the error

错误:



System.Net .WebException:请求被中止:请求被取消。

在System.Net.HttpWebRequest.GetResponse()

在StatService.SoftwareStatisticsHttpRequest.Post(String url,SoftwareStatisticsProxySettings proxySettings,Byte [] inData,Byte []& outData)


System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.HttpWebRequest.GetResponse()
at StatService.SoftwareStatisticsHttpRequest.Post(String url, SoftwareStatisticsProxySettings proxySettings, Byte[] inData, Byte[]& outData)



我无法找到为什么会出现此错误。你可以告诉我为什么会出现这个运行时错误。


I am unable to find why this error is coming. can you please tell me why this runtime error is coming.

推荐答案

就你的Cursor问题而言, WebBrowser 不支持编辑光标。阅读更多相关信息: https://social.msdn.microsoft.com/Forums/windows/en-US/caa06048-b90f-4fcf-842e-46da9c89882c/webbrowser-control-how-do- i-set-its-cursor?forum = winforms [ ^ ]。您需要在HTML文档中执行此操作。可能使用CSS会是一个好主意,只需为您的HTML编写此CSS代码,



As far as your Cursor problem is concerned, the WebBrowser does not support editing the Cursor. Read more about it at: https://social.msdn.microsoft.com/Forums/windows/en-US/caa06048-b90f-4fcf-842e-46da9c89882c/webbrowser-control-how-do-i-set-its-cursor?forum=winforms[^]. You are required to perform this action inside your HTML document. Probably using CSS would be a great idea, just write this CSS code for your HTML,

html {
   cursor: wait;
}





这将与您想要的相似。



其次,您所指的问题可以通过错误消息请求被取消完全理解。我的猜测是你正在为请求设置时间(如果你是web应用程序的管理员)或者第二次猜测你想要引用的网站需要Same-Origin政策。你无法从中获取资源。其他可能的原因。为什么不调试呢?



This would perform similar to what you want to do.

Secondly, the problem you are referring to it quite understandable by the error message, "The request was canceled." My guess to this would be that you are setting time out for the request (if you are admin of the web application) or second guess that the website you are trying to refer to requires "Same-Origin" policy. You cannot get resources from it. Quite other possible reasons. Why not debug it?


这篇关于WebBrowser控件不支持Cursor属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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