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

Re: Sending a key message by Paul

Paul
Mon Jan 16 10:21:17 CST 2006

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



Re: Sending a key message by RIch

RIch
Mon Jan 16 22:18:02 CST 2006

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
>
>
>

Re: Sending a key message by ctacke/>

ctacke/>
Mon Jan 16 22:49:10 CST 2006

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
>>
>>
>>



Re: Sending a key message by RIch

RIch
Mon Jan 16 23:05:04 CST 2006

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
> >>
> >>
> >>
>
>
>