SHDeviceLockAndPrompt problems
-
WM 6.0 Pocket PC C# Visual Studio 2008 I have been trying to get the above command to work in order that I can allow the user to lock the device and stick it in his pocket between jobs without it bumping around and entering spurious data. The instructions seem quite striahtforward and I have followed them. Declare as ...... [DllImport("aygshell.dll")] public extern static IntPtr SHDeviceLockAndPrompt(); and call it with.... IntPtr hresult=SHDeviceLockAndPrompt(); When I run the code I get a 0 return but nothing happens. I have signed the app and I don't get any errors or prompts on the PDA when executing. I can use the lock functionality on the PDA directly and it is fine. I have no passwords set up. I have a few questions: 1. Does anybody have any idea what I may be doing wrong 2. Does anybody know what should happen. I added a button to one of the forms (launched by another form) in my app and used the on_click event to make the function call. I am trying to picture what should happen to the UI. 3. Assuming that I can't get this to work, does anybody have any suggestions as to how I can disable/enable the app quickly and easliy by the user. I realise that the user could just put the forms into the background and click the WM Lock button but I really need a single click solution. Thanks