询问者
.net 4.0 webbrowser如何和IE10行为一致

问题
-
我是用的win8系统,所以安装的ie是ie10,现在进行.net开发,一个网页在ie10的行为正常,但是在.net webbrowser的行为就不正常了,我通过改注册表:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
"myapplication.exe“ =DWORD(10001)此值为ie10
还是不能保持行为一致,网页上主要是使用了”MSPointerMove",用来监听触摸行为,经测试,在ie10里能够正常做出反应
有谁知道是什么问题嘛?谢谢
全部回复
-
我是用的win8系统,所以安装的ie是ie10,现在进行.net开发,一个网页在ie10的行为正常,但是在.net webbrowser的行为就不正常了,我通过改注册表:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
"myapplication.exe“ =DWORD(10001)此值为ie10
还是不能保持行为一致,网页上主要是使用了”MSPointerMove",用来监听触摸行为,经测试,在ie10里能够正常做出反应
有谁知道是什么问题嘛?谢谢
补充:该project是一个 windows form project!不是metro风格的project -
是什么样的行为不正常? 点了链接不打开? 不能在文本框输入?手势没效果?
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
是手势没有效果,不论是手势点击(MSPointerDown)还是(MSPointerMove等都不能触发),
html如下:
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
canvas {
overflow: hidden;
-ms-content-zooming: none; /* Disable pan/zoom */
-ms-touch-action:none;
}
</style>
<script>
var canvas;
var ctx;
var w = 0;
var h = 0;
var drawId = new Array();
function ol() {
canvas = document.getElementById('canvas');
canvas.addEventListener("MSPointerMove",function(e)
{alert("pointermove");
},false);
canvas.addEventListener("MSPointerDown",function(e)
{
alert("MSPointerDown");
},false);canvas.addEventListener("MSPointerUp",function(e)
{
alert("MSPointerUp");
},false);}
</script>
</head>
<body onload="ol()">
<canvas id="canvas" width="500px" height="500px" style="border: 2px solid #000000"></canvas>
</body>
</html>用ie10打开一切正常,能捕获到各种行为,但是在webbrowser里不能捕获到
-
你好
你试试 这个sample:https://skydrive.live.com/?cid=bb789f72272d4858&id=BB789F72272D4858%212452
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
Hi Vancant,
那用那个例子打开你的网页试试。
另外我直接用IE10 打开你的页面的时候,会报错,显示“addEventListener” 不可识别。
你可以按F12查看开发模式
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.