Control.DefaultImeMode Control.DefaultImeMode Control.DefaultImeMode Control.DefaultImeMode Property

定義

取得控制項支援的預設輸入法 (IME) 模式。Gets the default Input Method Editor (IME) mode supported by the control.

protected:
 virtual property System::Windows::Forms::ImeMode DefaultImeMode { System::Windows::Forms::ImeMode get(); };
protected virtual System.Windows.Forms.ImeMode DefaultImeMode { get; }
member this.DefaultImeMode : System.Windows.Forms.ImeMode
Protected Overridable ReadOnly Property DefaultImeMode As ImeMode

屬性值

其中一個 ImeMode 值。One of the ImeMode values.

範例

下列程式碼會覆寫DefaultImeMode屬性可開啟輸入法關閉。The following code example overrides the DefaultImeMode property to turn off the Input Method Editor.

protected:
   property System::Windows::Forms::ImeMode DefaultImeMode 
   {
      virtual System::Windows::Forms::ImeMode get() override
      {
         // Disable the IME mode for the control.
         return ::ImeMode::Off;
      }

   }
protected override ImeMode DefaultImeMode
{
   get
   {
      // Disable the IME mode for the control.
      return ImeMode.Off;
   }
}
Protected Overrides ReadOnly Property DefaultImeMode() As ImeMode
   Get
      ' Disable the IME mode for the control.
      Return ImeMode.Off
   End Get
End Property

備註

輸入法 (IME) 是可讓使用者使用標準鍵盤輸入複雜字元和符號,例如日文漢字字元的程式。An Input Method Editor (IME) is a program that enables users to enter complex characters and symbols, such as Japanese Kanji characters, by using a standard keyboard.

中實作Control類別,這個屬性一律傳回ImeMode.Inherit值。As implemented in the Control class, this property always returns the ImeMode.Inherit value. Inherit值可讓您指定的 IME 模式繼承自父控制項。The Inherit value specifies that the IME mode is inherited from the parent control.

給繼承者的注意事項

當覆寫DefaultImeMode屬性在衍生類別中,使用基底類別的DefaultImeMode擴充的基底實作的屬性。When overriding the DefaultImeMode property in a derived class, use the base class's DefaultImeMode property to extend the base implementation. 否則,您必須提供所有的實作。Otherwise, you must provide all the implementation.

適用於

另請參閱