I'm not surprised about that. If the browser has the focus, and I'd be
surprised if it didn't, why would keys end up at your form? The browser is
using them.
For this kind of thing, RegisterHotKey() may be an appropriate solution,
although you may want to unregister your hotkeys for the cursor when your
application is deactivated, so that the user doesn't get action in your
application when using the keys in some other application.
Alternatively, use ApplicationEx from OpenNETCF and an IMessageFilter to
catch all keypresses and do whatever with the cursor keys as they arrive.
Paul T.
[quoted text, click to view] "Felix Joachim" <felix339@web.de> wrote in message
news:274b7$42efb177$54b2cf33$4259@nf1.news-service.com...
> Hi,
> can somebody confirm this problem, or is there some easy solution?
>
> What I wanted to do is let the user use the hardware cursor keys to do
> some stuff in the application while the webbrowser component is activated.
> At the moment I don't get any key events when a browser is on the form
> though.
>
>
>
> Felix Joachim wrote:
>> So far I've only added some code to the KeyEventHandler of the form and
>> the webbrowser component.
>>
>> The .Net 2.0 webbrowser control doesn't have any key events as it seems.
>>
>>
>> <ctacke/> wrote:
>>
>>> So the entire app quits getting key down events? How are you trying to
>>> trap them?
>>>
>>> -Chris
>>>
>>>
>>> "Felix Joachim" <felix339@web.de> wrote in message
>>> news:8f10d$42ecaba1$54b2cbe4$5046@nf1.news-service.com...
>>>
>>>> Hi,
>>>>
>>>> I've had a problem with not getting any KeyDown events in my program
>>>> for some time. After some experimenting with empty forms I found out
>>>> that they stopped being raised after putting a webbrowser control on
>>>> the form.
>>>>
>>>> Any ideas why this happens or what to do about it?
>>>
>>>
>>>
>>>