PC Review


Reply
Thread Tools Rate Thread

[C#] How can I listen a key of my keyboard

 
 
=?Utf-8?B?RnJlZGR5Ym95?=
Guest
Posts: n/a
 
      18th May 2005
Hi,

I'd like to listen a key of my keyboard to execute some code when that key
is pressed. I'm not use a Windows Forms that's why I can not use a keydown
event.

In fact I'd like to do a thing like a reboot when 2/3 keys are pressed.

But I don't know how I can do.

Maybe to listen window message ?

Could you help me please ?

Thanks
 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      18th May 2005
RegisterHotKey(), maybe. It's a call that you'd have to P/Invoke and you'd
have to catch the WM_HOTKEY message in either a MessageWindow subclass or
with something like OpenNETCF's ApplicationEx and an IMessageFilter
subclass. There might even be a declaration for it in there already...

Paul T.

"Freddyboy" <(E-Mail Removed)> wrote in message
news:5BDA71A8-C3BD-490C-8DA2-(E-Mail Removed)...
> Hi,
>
> I'd like to listen a key of my keyboard to execute some code when that key
> is pressed. I'm not use a Windows Forms that's why I can not use a keydown
> event.
>
> In fact I'd like to do a thing like a reboot when 2/3 keys are pressed.
>
> But I don't know how I can do.
>
> Maybe to listen window message ?
>
> Could you help me please ?
>
> Thanks



 
Reply With Quote
 
Ginny Caughey [MVP]
Guest
Posts: n/a
 
      18th May 2005
Look on www.opennetcf.org for ApplicationEx and IMessageFilter.

Ginny Caughey
..NET Compact Framework MVP

"Freddyboy" <(E-Mail Removed)> wrote in message
news:5BDA71A8-C3BD-490C-8DA2-(E-Mail Removed)...
> Hi,
>
> I'd like to listen a key of my keyboard to execute some code when that key
> is pressed. I'm not use a Windows Forms that's why I can not use a keydown
> event.
>
> In fact I'd like to do a thing like a reboot when 2/3 keys are pressed.
>
> But I don't know how I can do.
>
> Maybe to listen window message ?
>
> Could you help me please ?
>
> Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Listen to me =?Utf-8?B?SmFtaWUgUGx1Y2luc2tp?= Windows Vista Mail 1 14th Aug 2006 03:44 PM
Listen to me sucpuri Microsoft Powerpoint 0 14th Aug 2006 02:59 PM
Listen to me sucpuri Microsoft Excel Misc 0 14th Aug 2006 02:59 PM
Listen on different keyboard =?Utf-8?B?SEsgZ3V5?= Microsoft C# .NET 0 14th Sep 2004 01:39 AM
LISTEN AGAIN TO BBC Roy Foster Windows XP Hardware 1 20th Nov 2003 10:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:26 AM.