Turn off screen and lock device


Licensed User

Is it possible to just turn off the screen of the device and lock the buttons without sending the device to suspend?

I'm monitoring GPS location and sending this information to a server. When the device goes to suspend the GPS-Device is turned off and the data connection is disconnected. This is bad as I won't send any localisation data any more. The solution would be to keep the device active, but as the device will be most of the time in a pocket, it consumes too much power to keep the display active. Also the buttons can accidentally been hit.

What I'd like to achieve is to catch the press of the power button but do not send the device to suspend, but turn off the screen and lock the buttons. Another press to the power button should re-enable buttons and screen.

Is this possible?



Staff member
Licensed User


Well-Known Member
Licensed User
Hello Hitec!

Do you found an answer for this problem? I have tried anything, that Erel says, but the PDA always stops working. When I use the pachpower.dll, hardware.keepalive doesn't prevent, that the pocket-pc is suspending. I have a similar application, that sends the GPS-data to a server and I also have the same problems.

Thanks for answer....