views:

20

answers:

1

I need to lock Windows Mobile Screen (without using default locking system) on perticular activity.

I have seen on web that developers are using SHDeviceLockAndPrompt or EnableHardwareKeyboard for achieving lock.

This will show default window lock screen. I need to show my screen with own checking of password with my own database. How can I show my screen and lock device screen (hardware keys and keyboard, incoming phone calls, notifications etc)?

+1  A: 

It all deponds on how secure you wont it to be. You will get the best security if you use windows mobile's own lock screen and then customize it ( Windows Mobile 6.5 I think it can be done quit nice ).

If it not a top notch security thing you can always make your own application be the top most, add the stuff you like on that view. Then use: SetWindowsHookEx ( Sorry I can't hyperlink, to bad reputation ... just search on MSDN ) to hook up on all the hardware buttons and return non zero to prevent other parts of the system to handle them. Have a look at this link

To really prevent the user from accessing anything behind the view you can remove the start menu by puting it outside of the view. Use SetWindowPos Function

The start menu thing is only if you need to do stuff in the background, than it can pop down. I have found this trick good to prevent it.