Share via


InputModeEditor.SetInputMode Method

Specifies the input mode on a Smartphone.

Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)

Syntax

'Declaration
Public Shared Sub SetInputMode ( _
    control As Control, _
    mode As InputMode _
)
'Usage
Dim control As Control
Dim mode As InputMode

InputModeEditor.SetInputMode(control, mode)
public static void SetInputMode (
    Control control,
    InputMode mode
)
public:
static void SetInputMode (
    Control^ control, 
    InputMode mode
)
public static void SetInputMode (
    Control control, 
    InputMode mode
)
public static function SetInputMode (
    control : Control, 
    mode : InputMode
)
Not applicable.

Parameters

  • control
  • mode

Remarks

You can set the input mode only on a TextBox.

Example

The following code example sets a text box to have a numeric input mode. This code example is part of a larger example provided for the InputModeEditor class.

' Set input mode for phone number text box to Numeric.
InputModeEditor.SetInputMode(textBox2, InputMode.Numeric)
// Set input mode for phone number text box to Numeric.
InputModeEditor.SetInputMode(textBox2, InputMode.Numeric);

Platforms

Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

InputModeEditor Class
InputModeEditor Members
Microsoft.WindowsCE.Forms Namespace