Set the HardwareKey property to one of the HardwareKeys enumeration values. You can configure up to six hardware buttons.
When a hardware button is associated with a control, the control receives a KeyDown event when the button is pressed and a KeyUp event when the button is released.
To return a hardware button to its original state, set the AssociatedControl property to a null reference (Nothing in Visual Basic).
Note that some Pocket PCs have a different number of hardware buttons besides six. Also, not all buttons are supported by the operating system. Windows Mobile 2003 for Pocket PC supports four buttons and Windows Mobile version 5.0 software for Pocket PC supports five buttons.
This class is not supported on the Smartphone and other Windows CE devices that are not Pocket PCs.