PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Sending a key message
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Sending a key message
![]() |
Sending a key message |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
There is lots of doc on how to capture a key on the smartphone (e.g. back
key), but how do you send a key. I would like to programmatically push the 'home' key. Rich |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You could try P/Invoking keybd_event() to do that. If the Home key is
actually a *Home* key and not some software-interpreted key value (you'd send VK_HOME). Paul T. "RIch" <RIch@discussions.microsoft.com> wrote in message news:6545963C-E627-40B3-B56B-6052D7081D7C@microsoft.com... > There is lots of doc on how to capture a key on the smartphone (e.g. back > key), but how do you send a key. I would like to programmatically push > the > 'home' key. > > Rich |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I tried
[DllImport("Uibase.lib", EntryPoint = "keybd_event")] public static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, uint dwExtraInfo); I've also tried using user32.dll instead of uibase.lib. I get a runtime exception that it cant find the dll. From the doc's I can find, I have the correct dll. What I'm I doing wrong? Rich "Paul G. Tobey [eMVP]" wrote: > You could try P/Invoking keybd_event() to do that. If the Home key is > actually a *Home* key and not some software-interpreted key value (you'd > send VK_HOME). > > Paul T. > > "RIch" <RIch@discussions.microsoft.com> wrote in message > news:6545963C-E627-40B3-B56B-6052D7081D7C@microsoft.com... > > There is lots of doc on how to capture a key on the smartphone (e.g. back > > key), but how do you send a key. I would like to programmatically push > > the > > 'home' key. > > > > Rich > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
You're not calling the right dll. Like everyinthing in CE, it's coredll.dll
-Chris "RIch" <RIch@discussions.microsoft.com> wrote in message news:69A346D2-178B-4B92-A892-48DC3EAB3734@microsoft.com... >I tried > [DllImport("Uibase.lib", EntryPoint = "keybd_event")] > public static extern void keybd_event(byte bVk, byte bScan, uint > dwFlags, uint dwExtraInfo); > > I've also tried using user32.dll instead of uibase.lib. I get a runtime > exception that it cant find the dll. From the doc's I can find, I have the > correct dll. What I'm I doing wrong? > > Rich > > "Paul G. Tobey [eMVP]" wrote: > >> You could try P/Invoking keybd_event() to do that. If the Home key is >> actually a *Home* key and not some software-interpreted key value (you'd >> send VK_HOME). >> >> Paul T. >> >> "RIch" <RIch@discussions.microsoft.com> wrote in message >> news:6545963C-E627-40B3-B56B-6052D7081D7C@microsoft.com... >> > There is lots of doc on how to capture a key on the smartphone (e.g. >> > back >> > key), but how do you send a key. I would like to programmatically push >> > the >> > 'home' key. >> > >> > Rich >> >> >> |
|
|
|
#5 |
|
Guest
Posts: n/a
|
do'h!
Its been a while since I was into ce code. I remenber it all too clearly! Thanks "<ctacke/>" wrote: > You're not calling the right dll. Like everyinthing in CE, it's coredll.dll > > -Chris > > "RIch" <RIch@discussions.microsoft.com> wrote in message > news:69A346D2-178B-4B92-A892-48DC3EAB3734@microsoft.com... > >I tried > > [DllImport("Uibase.lib", EntryPoint = "keybd_event")] > > public static extern void keybd_event(byte bVk, byte bScan, uint > > dwFlags, uint dwExtraInfo); > > > > I've also tried using user32.dll instead of uibase.lib. I get a runtime > > exception that it cant find the dll. From the doc's I can find, I have the > > correct dll. What I'm I doing wrong? > > > > Rich > > > > "Paul G. Tobey [eMVP]" wrote: > > > >> You could try P/Invoking keybd_event() to do that. If the Home key is > >> actually a *Home* key and not some software-interpreted key value (you'd > >> send VK_HOME). > >> > >> Paul T. > >> > >> "RIch" <RIch@discussions.microsoft.com> wrote in message > >> news:6545963C-E627-40B3-B56B-6052D7081D7C@microsoft.com... > >> > There is lots of doc on how to capture a key on the smartphone (e.g. > >> > back > >> > key), but how do you send a key. I would like to programmatically push > >> > the > >> > 'home' key. > >> > > >> > Rich > >> > >> > >> > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

