GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Feb-2008, 00:21
Anil Darandale Anil Darandale is offline
New Member
 
Join Date: Jan 2008
Posts: 2
Anil Darandale is on a distinguished road

How do I lock the hardware buttons of Pocket PC in Dot net compact framework 2.0


I used below code to lock the hardware

CPP / C++ / C Code:
[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
Last edited by LuciWiz : 14-Feb-2008 at 15:21. Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 19:23

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:33.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.