DEL and BACKSPACE keys get eaten from WebBrowser

此生再无相见时 提交于 2019-12-01 18:16:09

Disclaimer: my answer is not related to Outlook plug-in, but it may help future visitors, who may find this page using a search engine (same as I did). It is relevant to the problem described, but in a different context.

Today is 2017, none of the answers worked (deleted, linked and others found by google search). I discovered that in my situation (embedded ActiveX control in a web page), DEL and BACKSPACE as well as other control keys (HOME, END, arrow keys) start working after I press TAB, and continues to work after that.

I added

obj.focus();

Immediately after setting the .Url in my Javascript, and it magically solved the problem (obj is my ActiveX browser written in .NET, using WPF browser control under the hood).

SendKeys, setting focus from within the control and intercepting keys in .NET did not help.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!