how can i associate my app to one button?

Hi, all,

I am doing some application on my WM5.0 smartphone by using VS 2005. How can I associate my app with one button I mean, when you push this button, my app will be executed, instead of every time going the directory and execute my app

Thanks for the reply!



Answer this question

how can i associate my app to one button?

  • sbuster

    H, Lyon,

    Thanks for your reply.... But I dont quite understand..... How creating a proecess can be related with one button launch application Could you please be more specific

    Thanks a lot


  • lissbpp

    Sounds like you need a service running in the background. You can activate a service by using ActivateService:

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/wcecomm5/html/wce50lrfactivateservice.asp

    Just to give you my 2 cents overriding a button on your cellphone is probably not a good idea. Other programs may be relying on that button and so if they need it, your app would always launch as well as performing the standard operation. This would lead to a very bad user experiance. Sort of like how popups are a bad user experience for IE.



  • M. Nicholas

  • jdang

    Sorry for expressing myself wrongly.... I understand what you meant now: launching the app from a different app. But my question is if it is possible to launch my app by just push one button (the app is not active before and this is the first time push it). Like how you make the voicemail dialing from long pressing "#1" in the key pad.

    Sorry for the confusion... Hope you can answer this..... Many thanks!


  • giko

    Check out the reg key HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Keys and the shell function SHSetAppKeyWndAssoc.

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceshellui5/html/wce50lrfgeneralshellregistrysettings.asp



  • PatMcHargue

    You can't launch an application without creating a process, this is because an application is a process. You can't create an application on a thread it has to be it's own process. Maybe I misunderstood your original post. I thought you wanted to press a button in the first application and launch a secondary application. Is this right

  • how can i associate my app to one button?