Webbrowser Control in my .NET Windows Form application is stealing shortcuts when on focused. To able to use Alt + F4
I had to click a control first.
Currently "WebbrowserShortcuts = false
" but it's still same.
Is there a way to stop this irritating behaviour?
I had this problem when loading Silverlight inside a winforms WebBrowser and I solved it by adding the following to the <body>
element:
onload="document.getElementById('silverlightControl').focus()"
...which, of course, meant I have to give an id of silverlightControl
to my <object>
element:
<object id="silverlightControl" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
If you only have HTML, maybe you can call focus()
on the document
or perhaps the first hyperlink?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With