Reputation: 450
i really need to catch "ESC" key press while focus is on WebBrowser control. I tried something like this:
(webControl as Control).KeyPress += new KeyPressEventHandler(MyKeyPressEventHandler);
But it doesnt work. The method is not called. I tried some methods, described here, but dont get any result ( Help, please.
Upvotes: 2
Views: 3177
Reputation: 201
this.webBrowser.Document.Body.KeyUp += new HtmlElementEventHandler(Body_KeyUp);
Upvotes: 2