I used below code to lock the hardware
[DllImport("coredll")]
public static extern IntPtr GetCapture();
[ DllImport("AYGSHELL.DLL")]
private static extern uint SHFullScreen(IntPtr hwndRequester, uint dwState);
private void HideStartButton()
{
hwnd = GetCapture();
SHFullScreen(hwnd, SHFS_HIDESTARTICON);
}
Using this code in dot net compact framework 1.1. , I am able to lock all key and buttons except Power on-off of Pocket PC. But in 2.0 framework, other than the key down button (i.e. key up ,key Down, Key Left and Key Right), all keys get disabled. I want to disable this keys so it will not affect in my application, Currently what happen, when I select any value in combo box and if I press any one of these keys then my selected combo value get changed.
In framework 2.0, Microsoft provide Key Preview property for form. I checked how it work but it did not solved my problem
Please help to lock theses keys.
Anil