Control.ImeMode 属性

定义

获取或设置控件的输入法编辑器 (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. 对于仅用于输入数值的 TextBox 控件,ImeMode 属性通常设置为 ImeMode.OffThe ImeMode property is typically set to ImeMode.Off for a TextBox control that is intended to only enter numeric values. Form 类的 ImeMode 属性值设置为 ImeMode.NoControlThe 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.DisableThe 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.

当全局输入模式生效时,Windows 8 上将忽略 ImeMode 属性。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.

适用于

另请参阅