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