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 similar but the WebBrowser control seems to handle all keypresses itself.
Is there any way to override the WebBrowser_KeyDown function?
Set the
KeyPreviewproperty on theFormto True:http://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview.aspx