all groups > dotnet compact framework > february 2005 >
You're in the

dotnet compact framework

group:

Using hardware keys and releasing them


Re: Using hardware keys and releasing them ctacke/
2/28/2005 10:25:49 PM
dotnet compact framework: Remove your registration on deactivate.

-Chris


[quoted text, click to view]

Using hardware keys and releasing them Terry Brown
2/28/2005 11:23:58 PM
I have finally managed to get my application to detect and use the
Hardware Keys when it is running. I use code posted by "Mastermind" at
http://www.opennetcf.org/Forums/post.asp?method=ReplyQuote&REPLY_ID=1065&TOPIC_ID=283&FORUM_ID=12
this code uses RegisterHotKey and UnregisterFunc1 from coredll to capture
the keys.

The problem, however, is that while my app is running it apparently owns
the keys, so if you press them (even when the app is not in the
foreground), they are trapped by my app and don't perform the expected
function (like start email or calendar, for example).

I haven't been able to find any references to a solution for this. I
understand I am not supposed to really close my application, that it just
"minimizes" when the user presses the "x" button (boy, is that a user
interface wart!), but it seems I should be able to "give up" the buttons
when my app is not in the foreground.

I've noticed at least one other application which I use on my device that
behaves this way, but it just seems wrong to me.

How do I go about solving this??

Thanks,

Terry Brown
Stickman Software
http://www.stickmansoftware.com

Re: Using hardware keys and releasing them Terry Brown
3/1/2005 6:02:21 PM
Thanks, with your help, I finally figured out how to do this.

Sometimes I despair of learning all I need to know about this stuff. Then
I remember that this is only a hobby--if I couldn't answer these kind of
questions about fpga's and verilog, then I'd need to worry :)



[quoted text, click to view]

AddThis Social Bookmark Button