Jump to content


Returning to the Homescreen from an application

- - - - -

  • Please log in to reply
2 replies to this topic

#1
dh

dh

    Regular

  • Members
  • PipPip
  • 109 posts
  • Devices:Orange SPV C500
I'm trying to hide the current application window, ideally sending it to the background and forcing the homescreen to the front. I want to be able to return to the app, either by using task manager or launching the app shortcut. I've tried to use the GetDesktopWindow() followed by SetForegroundWindows() function but this doesn't seam to be available in c#. I'm developing using .net 2003 for Smartphone 2003 platform.


#2
MrMagoo

MrMagoo

    Enthusiast

  • Members
  • PipPipPip
  • 205 posts
I don't know if .net has it's own way - I don't use it - but if you want to use this native (c++) code, it works:

keybd_event(VK_LWIN,0,0,0); 

keybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0);

just look in the help for keybd_event for details of which library to link


#3
dh

dh

    Regular

  • Members
  • PipPip
  • 109 posts
  • Devices:Orange SPV C500
It does, just the job. Thanks, there's always so many ways to acheive what you want, it seems I'd tried and search for everything but sending the homekey, strange really as it right in front of me!
Thanks for you help





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users