Hi,
I think Einar's right. The WebBrowser control derives from WebBrowserBase which is bascially a wrapper for the ActiveX control.
Regards,
Viv
>ActiveX control? Are you not using the new System.Windows.Forms.WebBrowser control? You should be. It's not ActiveX.
>
>~~Bonnie
>
>
>
>
>>Viv,
>>Thanks for testing. I also created a new test form and now I can get the form's keyobard events to fire, but only after I mouse click the webbrowser control on the form. After I click a keyboard button and the keyboard even fire I have to mouse click the webbrowser control again. Is that the behaviour you saw?
>>
>>I tried to access the keyboard events for the WebBrowser control in code (not through the property window) and exceptions were thrown left and right, but I noticed that the WebBrowser control is an ActiveX control, and that might be the reason for my troubles.
>>
>>Einar
>>
>>UPDATE: If I display something in the webbrowser control using the Url property (this.webBrowser1.Url = new Uri(@"c:\einar\1024x768.pdf");) the keyboard events don't fire even after mouse clicking the webbrowser control.
>>
>>>Hmm. WebBrowser control derives from Control and Control has a KeyPress event. Why do you say it WebBrowser doesn't have one? (Just looking at docs - haven't tried it.....)
>>>
>>>UPDATE: Just tried a WebBrowser on a form with KeyPreview true. Form got the KeyPress event just fine. OTOH, you seem to be right - the WebBrowser control doesn't expose the KeyPress event (at least not in the properties window)....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only