Locking Windows Phone with Custom Screen C#
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 sc开发者_开发技巧reen (hardware keys and keyboard, incoming phone calls, notifications etc)?
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
精彩评论