HardwareButton Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Allows overriding the functionality of Pocket PC hardware buttons.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
You can configure a button on a Pocket PC to activate a Form, Panel, or custom control in your application by doing the following:
Create an instance of HardwareButton.
Set the AssociatedControl property to the form or control you want to activate.
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 nullptr.
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.
Note |
|---|
The hardware buttons correspond to the application keys on a Pocket PC. The application keys are not included in the core key set, so their hardware key mapping may vary from one keyboard layout to the next. Only the default hardware key mapping on the device is supported. This class is not supported on the Smartphone and other Windows CE devices that are not Pocket PCs. |
System::MarshalByRefObject
System.ComponentModel::Component
Microsoft.WindowsCE.Forms::HardwareButton
Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note