PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
No KeyDown events after placing OpenNetCF webbrowser control?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
No KeyDown events after placing OpenNetCF webbrowser control?
![]() |
No KeyDown events after placing OpenNetCF webbrowser control? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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? > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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? >> >> >> >> |
|
|
|
#5 |
|
Guest
Posts: n/a
|
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. "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? >>> >>> >>> >>> |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Of course the form won't get events if the browser has focus.
Why doesn't the browser get any then though, if I put some code in it's key-events? Paul G. Tobey [eMVP] wrote: > 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. > > "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? >>>> >>>> >>>> >>>> > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
The browser is just wrapping the real native control, I'm sure. That's what
has focus and, if that's true, the keys don't pass through managed code event handlers before going to the real control. Paul T. "Felix Joachim" <felix339@web.de> wrote in message news:8be5$42efb577$54b2cf33$5123@nf1.news-service.com... > Of course the form won't get events if the browser has focus. > > Why doesn't the browser get any then though, if I put some code in it's > key-events? > > > Paul G. Tobey [eMVP] wrote: >> 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. >> >> "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? >>>>> >>>>> >>>>> >>>>> >> |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Are you shure its the webbrowser control? I have the same problem after adding the listView.
From http://www.developmentnow.com/g/18_...wser-control.ht Posted via DevelopmentNow.com Group http://www.developmentnow.com |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

