473,487 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PockePC Keys

Hi,
I am deveopping an application on the pocket pc and I need to program
keys to toggle between 2 application. Exactly from the first
application I want to open a second application and throught the keys
of my device I want to toggle between these two application.
THank you very much

Dec 19 '06 #1
3 1254
Hi,

You can program the keys to launch a program, then in the program you can
check if there is an instance of it running already (IIRC PPC2003 let you
run only 1 instance of an app) and if so activate it.
I do not have the code here with me but programming the keys are as easy as
to change the registry.

I suggest you to post the quesiton in the compactframework NG
--
Ignacio Machin
machin AT laceupsolutions com

"Sheikko" <sh*****@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi,
I am deveopping an application on the pocket pc and I need to program
keys to toggle between 2 application. Exactly from the first
application I want to open a second application and throught the keys
of my device I want to toggle between these two application.
THank you very much

Dec 19 '06 #2
Hi, I have found the way to assign programs to a specific application
by modifying the registry key:

private void SetHwButtons()
{
RegistryKey rkey = Registry.LocalMachine;

RegistryKey rkey1 = rkey.OpenSubKey("SOFTWARE");
RegistryKey rkey2 = rkey1.OpenSubKey("Microsoft");
RegistryKey rkey3 = rkey2.OpenSubKey("Shell");
RegistryKey rkey4 = rkey3.OpenSubKey("Keys");

// 40C2 is the button kry number 2
RegistryKey rkey5 = rkey4.OpenSubKey("40C2", true);

rkey5.SetValue("Default", "\"PATH OF
APPLICATION TO LUNCH\"");
rkey5.SetValue("ResetCmd", "\"PATH OF
APPLICATION TO LUNCH\"");
}

but I need to send back a yet opened application. I can minimize it
(cliking on the smart minimize (X) ), but in this case I want to know
how I can call it from my interface. I need to know it's ID Proccess.
There are some solutions, but they use "Microsoft.WindowsCE.Forms"
namespace, while me I use pocket pc.

THank you in advance

Ignacio Machin ( .NET/ C# MVP ) ha scritto:
Hi,

You can program the keys to launch a program, then in the program you can
check if there is an instance of it running already (IIRC PPC2003 let you
run only 1 instance of an app) and if so activate it.
I do not have the code here with me but programming the keys are as easy as
to change the registry.

I suggest you to post the quesiton in the compactframework NG
--
Ignacio Machin
machin AT laceupsolutions com

"Sheikko" <sh*****@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi,
I am deveopping an application on the pocket pc and I need to program
keys to toggle between 2 application. Exactly from the first
application I want to open a second application and throught the keys
of my device I want to toggle between these two application.
THank you very much
Dec 20 '06 #3
Hi,

You can use Process.GetProcesses() to get all the processes and then you can
get the processID.

I do something similar but enumerating windows instead. then I use the API
to bring forward the app
--
Ignacio Machin
machin AT laceupsolutions com

"Sheikko" <sh*****@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
Hi, I have found the way to assign programs to a specific application
by modifying the registry key:

private void SetHwButtons()
{
RegistryKey rkey = Registry.LocalMachine;

RegistryKey rkey1 = rkey.OpenSubKey("SOFTWARE");
RegistryKey rkey2 = rkey1.OpenSubKey("Microsoft");
RegistryKey rkey3 = rkey2.OpenSubKey("Shell");
RegistryKey rkey4 = rkey3.OpenSubKey("Keys");

// 40C2 is the button kry number 2
RegistryKey rkey5 = rkey4.OpenSubKey("40C2", true);

rkey5.SetValue("Default", "\"PATH OF
APPLICATION TO LUNCH\"");
rkey5.SetValue("ResetCmd", "\"PATH OF
APPLICATION TO LUNCH\"");
}

but I need to send back a yet opened application. I can minimize it
(cliking on the smart minimize (X) ), but in this case I want to know
how I can call it from my interface. I need to know it's ID Proccess.
There are some solutions, but they use "Microsoft.WindowsCE.Forms"
namespace, while me I use pocket pc.

THank you in advance

Ignacio Machin ( .NET/ C# MVP ) ha scritto:
>Hi,

You can program the keys to launch a program, then in the program you can
check if there is an instance of it running already (IIRC PPC2003 let you
run only 1 instance of an app) and if so activate it.
I do not have the code here with me but programming the keys are as easy
as
to change the registry.

I suggest you to post the quesiton in the compactframework NG
--
Ignacio Machin
machin AT laceupsolutions com

"Sheikko" <sh*****@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegr oups.com...
Hi,
I am deveopping an application on the pocket pc and I need to program
keys to toggle between 2 application. Exactly from the first
application I want to open a second application and throught the keys
of my device I want to toggle between these two application.
THank you very much

Dec 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1687
by: Blair Hall | last post by:
I would like to determine whether two dictionaries have the same set of keys. Can anyone tell me if I HAVE to sort the key sequences as in this code snippet: # d1, d2 already created k1 =...
31
3331
by: Robert Brown | last post by:
Let's say I have a type hierarchy: (just an example) the general entity customer: CREATE TABLE customer(customer_id int, customer_name varchar(250), customer_type int) three specific...
0
1570
by: OC | last post by:
Because of the requirements on a high-speed data entry form, I need to reliably trap certain keys (specifically the "/", "*", "-", and "+") keys on the 10-key pad and treat them as "Function keys"....
4
15210
by: pixel | last post by:
hi i just discovered something strange when i use in ProcessCmdKey this construction switch(keyData) { case Keys.Left: {
14
3434
by: vatamane | last post by:
This has been bothering me for a while. Just want to find out if it just me or perhaps others have thought of this too: Why shouldn't the keyset of a dictionary be represented as a set instead of a...
11
11385
by: John | last post by:
I am coding a radix sort in python and I think that Python's dictionary may be a choice for bucket. The only problem is that dictionary is a mapping without order. But I just found that if the...
2
3302
by: Charles Law | last post by:
I'll kick myself when you tell me, but ... I have a user control on a form, and I want the user control to see the arrow keys when I press them. If I press just about any other key the control's...
1
2039
by: Sam Samson | last post by:
Greeetings All .. For my users convenience I have mapped function keys F2 .. F12 to change the tabs on the Tabcontrol. Works like a charm <ominous musicuntil one hits F8</ominous music> ...
0
1182
by: Menlalen | last post by:
K E Y S , A L I C I A M P 3 D O W N L O A D *Fallin 2001* 'Keys, Alicia - Fallin' (http://tinyurl.com/4zg3sr) (3:30 4.82Mb 192kbps) 'Keys, Alicia - Fallin (ft BustaRhymes and Rampage)'...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.