Catch keypresses in C#
I need to catch keypresses in my C# program that has a WebBrowser control in it.
I know how to do it if there isn't any controls on the form or if I use a textbox or sim开发者_Go百科ilar but the WebBrowser control seems to handle all keypresses itself.
Is there any way to override the WebBrowser_KeyDown function?
Set the KeyPreview
property on the Form
to True:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview.aspx
精彩评论