PC Review


Reply
Thread Tools Rate Thread

Programatically Calling a Softkey (device button)

 
 
Zac Maclean
Guest
Posts: n/a
 
      28th Dec 2004
First: I have googled this. Lots of info everywhere about using device
buttons in programs, but I have yet to find anything on calling a buttton
press from a program.

I have a program that uses SQLCE and merge replication. I would like to
make the update process a few steps shorter by activating / deactivating the
WLAN as part of the program.

Just need to be pointed in the right place.


Devices are Dell Axim X3 and X30. Identical button configuration. Program
tested and running ono both.

Z. Maclean


 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      28th Dec 2004
Well, if you know what key the button represents, you can probably send it
via a P/Invoke of keybd_event(). *Do* you know what key it represents?

Paul T.

"Zac Maclean" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> First: I have googled this. Lots of info everywhere about using device
> buttons in programs, but I have yet to find anything on calling a buttton
> press from a program.
>
> I have a program that uses SQLCE and merge replication. I would like to
> make the update process a few steps shorter by activating / deactivating
> the WLAN as part of the program.
>
> Just need to be pointed in the right place.
>
>
> Devices are Dell Axim X3 and X30. Identical button configuration.
> Program tested and running ono both.
>
> Z. Maclean
>



 
Reply With Quote
 
Zac Maclean
Guest
Posts: n/a
 
      28th Dec 2004
Well.. All the capture docs I found tell me it is #5. And for Dell Axims
it corresonpds to 202 rather than a default of 197 (more to it than just
that, but those identify it best) So.. If I know how to "capture" it, the
same info is used to call it ?


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:(E-Mail Removed)...
> Well, if you know what key the button represents, you can probably send it
> via a P/Invoke of keybd_event(). *Do* you know what key it represents?
>
> Paul T.
>
> "Zac Maclean" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> First: I have googled this. Lots of info everywhere about using device
>> buttons in programs, but I have yet to find anything on calling a buttton
>> press from a program.
>>
>> I have a program that uses SQLCE and merge replication. I would like to
>> make the update process a few steps shorter by activating / deactivating
>> the WLAN as part of the program.
>>
>> Just need to be pointed in the right place.
>>
>>
>> Devices are Dell Axim X3 and X30. Identical button configuration.
>> Program tested and running ono both.
>>
>> Z. Maclean
>>

>
>



 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      28th Dec 2004
"#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd capture
it in code...

Paul T.

"Zac Maclean" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Well.. All the capture docs I found tell me it is #5. And for Dell
> Axims it corresonpds to 202 rather than a default of 197 (more to it than
> just that, but those identify it best) So.. If I know how to "capture"
> it, the same info is used to call it ?
>
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> wrote in message news:(E-Mail Removed)...
>> Well, if you know what key the button represents, you can probably send
>> it via a P/Invoke of keybd_event(). *Do* you know what key it
>> represents?
>>
>> Paul T.
>>
>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> First: I have googled this. Lots of info everywhere about using device
>>> buttons in programs, but I have yet to find anything on calling a
>>> buttton press from a program.
>>>
>>> I have a program that uses SQLCE and merge replication. I would like to
>>> make the update process a few steps shorter by activating / deactivating
>>> the WLAN as part of the program.
>>>
>>> Just need to be pointed in the right place.
>>>
>>>
>>> Devices are Dell Axim X3 and X30. Identical button configuration.
>>> Program tested and running ono both.
>>>
>>> Z. Maclean
>>>

>>
>>

>
>



 
Reply With Quote
 
Zac Maclean
Guest
Posts: n/a
 
      29th Dec 2004
The capture stuff I'd use is posted at OpenNETCF.org.
Looks like virtual key code. Also coded in HEX.

http://www.opennetcf.org/forums/topi...83&whichpage=1

I haven't played with it yet.. Was hoping not to have to add a whole new
module.

Will tackle it over the weekend. Have a lot to get done by Thursday...

Sole coder with a big project.. Lots of things running.


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:%(E-Mail Removed)...
> "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd
> capture it in code...
>
> Paul T.
>
> "Zac Maclean" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Well.. All the capture docs I found tell me it is #5. And for Dell
>> Axims it corresonpds to 202 rather than a default of 197 (more to it than
>> just that, but those identify it best) So.. If I know how to "capture"
>> it, the same info is used to call it ?
>>
>>
>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>> wrote in message news:(E-Mail Removed)...
>>> Well, if you know what key the button represents, you can probably send
>>> it via a P/Invoke of keybd_event(). *Do* you know what key it
>>> represents?
>>>
>>> Paul T.
>>>
>>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> First: I have googled this. Lots of info everywhere about using device
>>>> buttons in programs, but I have yet to find anything on calling a
>>>> buttton press from a program.
>>>>
>>>> I have a program that uses SQLCE and merge replication. I would like
>>>> to make the update process a few steps shorter by activating /
>>>> deactivating the WLAN as part of the program.
>>>>
>>>> Just need to be pointed in the right place.
>>>>
>>>>
>>>> Devices are Dell Axim X3 and X30. Identical button configuration.
>>>> Program tested and running ono both.
>>>>
>>>> Z. Maclean
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      29th Dec 2004
So, you're saying that Hardware5 is the right value to capture this button?
If so, to send that key code, which is a virtual key code, you'd do the
following with keybd_event():

keybd_event( VK_whatever, VK_whatever, 0, 0 );
keybd_event( VK_whatever, VK_whatever, KEYEVENTF_KEYUP, 0 );

KEYEVENTF_KEYUP is defined as 0x0002.

Paul T.

"Zac Maclean" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The capture stuff I'd use is posted at OpenNETCF.org.
> Looks like virtual key code. Also coded in HEX.
>
> http://www.opennetcf.org/forums/topi...83&whichpage=1
>
> I haven't played with it yet.. Was hoping not to have to add a whole new
> module.
>
> Will tackle it over the weekend. Have a lot to get done by Thursday...
>
> Sole coder with a big project.. Lots of things running.
>
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> wrote in message news:%(E-Mail Removed)...
>> "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd
>> capture it in code...
>>
>> Paul T.
>>
>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Well.. All the capture docs I found tell me it is #5. And for Dell
>>> Axims it corresonpds to 202 rather than a default of 197 (more to it
>>> than just that, but those identify it best) So.. If I know how to
>>> "capture" it, the same info is used to call it ?
>>>
>>>
>>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>>> wrote in message news:(E-Mail Removed)...
>>>> Well, if you know what key the button represents, you can probably send
>>>> it via a P/Invoke of keybd_event(). *Do* you know what key it
>>>> represents?
>>>>
>>>> Paul T.
>>>>
>>>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>> First: I have googled this. Lots of info everywhere about using
>>>>> device buttons in programs, but I have yet to find anything on calling
>>>>> a buttton press from a program.
>>>>>
>>>>> I have a program that uses SQLCE and merge replication. I would like
>>>>> to make the update process a few steps shorter by activating /
>>>>> deactivating the WLAN as part of the program.
>>>>>
>>>>> Just need to be pointed in the right place.
>>>>>
>>>>>
>>>>> Devices are Dell Axim X3 and X30. Identical button configuration.
>>>>> Program tested and running ono both.
>>>>>
>>>>> Z. Maclean
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Zac Maclean
Guest
Posts: n/a
 
      29th Dec 2004
Ok.. basically, I am turning on WLAN connection. I have logic figured out
to verify if I am connected or not. Calling keybd_event sounds right. I'll
dig into it.. :-)

Thanks for the input.


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:%(E-Mail Removed)...
> So, you're saying that Hardware5 is the right value to capture this
> button? If so, to send that key code, which is a virtual key code, you'd
> do the following with keybd_event():
>
> keybd_event( VK_whatever, VK_whatever, 0, 0 );
> keybd_event( VK_whatever, VK_whatever, KEYEVENTF_KEYUP, 0 );
>
> KEYEVENTF_KEYUP is defined as 0x0002.
>
> Paul T.
>
> "Zac Maclean" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> The capture stuff I'd use is posted at OpenNETCF.org.
>> Looks like virtual key code. Also coded in HEX.
>>
>> http://www.opennetcf.org/forums/topi...83&whichpage=1
>>
>> I haven't played with it yet.. Was hoping not to have to add a whole new
>> module.
>>
>> Will tackle it over the weekend. Have a lot to get done by Thursday...
>>
>> Sole coder with a big project.. Lots of things running.
>>
>>
>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>> wrote in message news:%(E-Mail Removed)...
>>> "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd
>>> capture it in code...
>>>
>>> Paul T.
>>>
>>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Well.. All the capture docs I found tell me it is #5. And for Dell
>>>> Axims it corresonpds to 202 rather than a default of 197 (more to it
>>>> than just that, but those identify it best) So.. If I know how to
>>>> "capture" it, the same info is used to call it ?
>>>>
>>>>
>>>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT
>>>> com> wrote in message news:(E-Mail Removed)...
>>>>> Well, if you know what key the button represents, you can probably
>>>>> send it via a P/Invoke of keybd_event(). *Do* you know what key it
>>>>> represents?
>>>>>
>>>>> Paul T.
>>>>>
>>>>> "Zac Maclean" <(E-Mail Removed)> wrote in message
>>>>> news:%(E-Mail Removed)...
>>>>>> First: I have googled this. Lots of info everywhere about using
>>>>>> device buttons in programs, but I have yet to find anything on
>>>>>> calling a buttton press from a program.
>>>>>>
>>>>>> I have a program that uses SQLCE and merge replication. I would like
>>>>>> to make the update process a few steps shorter by activating /
>>>>>> deactivating the WLAN as part of the program.
>>>>>>
>>>>>> Just need to be pointed in the right place.
>>>>>>
>>>>>>
>>>>>> Devices are Dell Axim X3 and X30. Identical button configuration.
>>>>>> Program tested and running ono both.
>>>>>>
>>>>>> Z. Maclean
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
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
C# WM5 - hide softkey-button-bar pezi Microsoft Dot NET Compact Framework 4 6th Feb 2009 07:35 AM
Any idea how to hide/show Softkey-Buttons? juvi Microsoft Dot NET Compact Framework 2 23rd Oct 2008 12:29 PM
Enable/Disable Hardware Device (Device Manager) programatically =?Utf-8?B?Um9vdFNweTIwMDY=?= Microsoft C# .NET 2 28th Apr 2006 10:44 AM
Server Side button calling page_load before calling it's own click event. Ryan Ternier Microsoft ASP .NET 4 29th Jul 2004 03:06 PM
how can i turn off a device programatically. thanks alberto garcia Microsoft Dot NET Compact Framework 3 5th Sep 2003 01:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:01 AM.