Control.ImeMode Control.ImeMode Control.ImeMode Control.ImeMode Property

定义

获取或设置控件的输入法编辑器 (IME) 模式。Gets or sets the Input Method Editor (IME) mode of the control.

public:
 property System::Windows::Forms::ImeMode ImeMode { System::Windows::Forms::ImeMode get(); void set(System::Windows::Forms::ImeMode value); };
public System.Windows.Forms.ImeMode ImeMode { get; set; }
member this.ImeMode : System.Windows.Forms.ImeMode with get, set
Public Property ImeMode As ImeMode

属性值

ImeMode 值之一。One of the ImeMode values. 默认值为 InheritThe default is Inherit.

异常

所分配的值不是一个 ImeMode 枚举值。The assigned value is not one of the ImeMode enumeration values.

注解

IME 是一种允许用户使用标准键盘输入复杂字符和符号(如日文汉字字符)的程序。An IME is a program that enables users to enter complex characters and symbols, such as Japanese Kanji characters, using a standard keyboard. 对于仅用于输入数值的ImeMode.Off ImeMode 控件,属性TextBox通常设置为。The ImeMode property is typically set to ImeMode.Off for a TextBox control that is intended to only enter numeric values. ImeMode.NoControl对于ImeMode 类,属性Form值设置为。The ImeMode property value is set to ImeMode.NoControl for the Form class.

大多数不直接支持输入法编辑器或允许输入法直接输入的类将此属性的值设置为NoControlMost classes that do not directly support Input Method Editors, or allow direct input from an IME, will set the value of this property to NoControl.

重要

用户可以以交互方式更改ImeMode ,除非它以编程方式设置ImeMode.Disable为。The user can interactively change the ImeMode unless it has been programmatically set to ImeMode.Disable. 在这种情况下,用户将无法使用 IME。In this case, the user will not be able to use the IME.

ImeMode全局输入模式生效时,Windows 8 上的属性会被忽略。The ImeMode property is ignored on Windows 8 when the global input mode is in effect. 有关详细信息,请参阅切换文本输入从每个线程更改为每用户For more info, see Switch Text Input Changed from Per-Thread to Per-User.

适用于

另请参阅