我有一个简单的Windows窗体应用程序,只不过是Form
包含WebBrowser
。WinForms WebBrowser blocking ProcessCmdKey
我重写了ProcessCmdKey方法,它工作正常。但是,虽然WebBrowser
是重点,但ProcessCmdKey
仍然被称为,但是,它不再拿起关键代码。
protected override bool ProcessCmdKey(ref Message msg, Keys keyData){
//When webbrowser has focus, only control or S are found - not both.
if(keyData==(Keys.Control|Keys.S)){
//Do things here.
return true;
}
return false;
}
你尝试覆盖在WebBroswer ...我依稀记得浏览器做了时髦与bubbing机事件...到做与安全。是的 – corlettk 2011-05-03 09:47:05
这是ActiveX托管协议的副作用。 IOleControlSite :: TranslateAccelerator()。 Ctrl + S是Internet Explorer的快捷键。你可以做的事情不多。 – 2011-05-03 23:41:22