HighTechTalks DotNet Forums  

key code problem

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss key code problem in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mike Shen
 
Posts: n/a

Default key code problem - 11-29-2006 , 03:37 AM






I just want to generate a key event through another key event,say, when i
press "A" , on the keyup event , I want to generate "B" press event. how to
do it?
I am newbie for C#. sorry for this simple question.



Reply With Quote
  #2  
Old   
Paul G. Tobey [eMVP]
 
Posts: n/a

Default Re: key code problem - 11-29-2006 , 11:17 AM






You'll have to P/Invoke to PostKeybdMessage(). I'm pretty sure that there's
been a suitable wrapper for this function posted before and you could also
use OpenNETCF's Smart Device Framework (www.opennetcf.org). Check via
GoogleGroups for past references:

http://groups.google.com/group/micro...UTF-8&oe=UTF-8

If you want to generate a non-alphanumeric character (not "B", but Enter,
for example), you'll have to P/Invoke keybd_event(), instead (also wrapped
in OpenNETCF).

Paul T.

"Mike Shen" <shlei2002 (AT) gmail (DOT) com> wrote

Quote:
I just want to generate a key event through another key event,say, when i
press "A" , on the keyup event , I want to generate "B" press event. how to
do it?
I am newbie for C#. sorry for this simple question.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.