PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Programatically Calling a Softkey (device button)
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Programatically Calling a Softkey (device button)
![]() |
Programatically Calling a Softkey (device button) |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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" <askme@some.com> wrote in message news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... > 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 > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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:O4xnTHQ7EHA.3596@TK2MSFTNGP12.phx.gbl... > 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" <askme@some.com> wrote in message > news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... >> 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 >> > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd capture
it in code... Paul T. "Zac Maclean" <askme@some.com> wrote in message news:eXg04dR7EHA.3076@TK2MSFTNGP15.phx.gbl... > 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:O4xnTHQ7EHA.3596@TK2MSFTNGP12.phx.gbl... >> 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" <askme@some.com> wrote in message >> news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... >>> 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 >>> >> >> > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
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/top...283&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:%236q5w1R7EHA.2540@TK2MSFTNGP09.phx.gbl... > "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd > capture it in code... > > Paul T. > > "Zac Maclean" <askme@some.com> wrote in message > news:eXg04dR7EHA.3076@TK2MSFTNGP15.phx.gbl... >> 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:O4xnTHQ7EHA.3596@TK2MSFTNGP12.phx.gbl... >>> 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" <askme@some.com> wrote in message >>> news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... >>>> 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 >>>> >>> >>> >> >> > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
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" <askme@some.com> wrote in message news:udYP45a7EHA.208@TK2MSFTNGP12.phx.gbl... > 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/top...283&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:%236q5w1R7EHA.2540@TK2MSFTNGP09.phx.gbl... >> "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd >> capture it in code... >> >> Paul T. >> >> "Zac Maclean" <askme@some.com> wrote in message >> news:eXg04dR7EHA.3076@TK2MSFTNGP15.phx.gbl... >>> 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:O4xnTHQ7EHA.3596@TK2MSFTNGP12.phx.gbl... >>>> 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" <askme@some.com> wrote in message >>>> news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... >>>>> 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 >>>>> >>>> >>>> >>> >>> >> >> > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
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:%23K6X8Jc7EHA.1292@TK2MSFTNGP10.phx.gbl... > 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" <askme@some.com> wrote in message > news:udYP45a7EHA.208@TK2MSFTNGP12.phx.gbl... >> 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/top...283&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:%236q5w1R7EHA.2540@TK2MSFTNGP09.phx.gbl... >>> "#5"? F5? ASCII 202? The virtual key code 202? Show me how you'd >>> capture it in code... >>> >>> Paul T. >>> >>> "Zac Maclean" <askme@some.com> wrote in message >>> news:eXg04dR7EHA.3076@TK2MSFTNGP15.phx.gbl... >>>> 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:O4xnTHQ7EHA.3596@TK2MSFTNGP12.phx.gbl... >>>>> 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" <askme@some.com> wrote in message >>>>> news:%23lvQi1O7EHA.2180@TK2MSFTNGP12.phx.gbl... >>>>>> 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 >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

