Monday, March 10, 2008

Keybd_event in Compact Framework

keybd_event(VkKeyScan(‘A’),0x9e,0 , 0); // ‘A’ Press

keybd_event(VkKeyScan(‘A’),0x9e, KEYEVENTF_KEYUP,0); // ‘A’ Release

But, you can not use VkKeyScan in Window CE. So you have to adjust it based on previous
two articles: Virtual Key codes as following:

keybd_event(0x41,0x9e,0 , 0); // ‘A’ Press

keybd_event(
0x41
,0x9e, KEYEVENTF_KEYUP,0); // ‘A’ Release




No comments: