Share via


InputLanguage.Handle Proprietà

Definizione

Ottiene l'handle della lingua di input.

public:
 property IntPtr Handle { IntPtr get(); };
public IntPtr Handle { get; }
member this.Handle : nativeint
Public ReadOnly Property Handle As IntPtr

Valore della proprietà

IntPtr

nativeint

Oggetto IntPtr che rappresenta l'handle della lingua di input.

Esempio

Nell'esempio di codice seguente viene recuperata la lingua di input corrente. Chiama Handle quindi per ottenere l'handle e stampa i risultati in una casella di testo. L'esempio richiede che textBox1 sia stata creata un'istanza.

public:
   void MyHandle()
   {
      // Gets the current input language.
      InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage;
      
      // Gets a handle for the language and prints the number.
      IntPtr myHandle = myCurrentLanguage->Handle;
      textBox1->Text = String::Format( "The handle number is: {0}", myHandle );
   }
public void MyHandle() {
   // Gets the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;

   // Gets a handle for the language  and prints the number.
   IntPtr myHandle = myCurrentLanguage.Handle;
   textBox1.Text = "The handle number is: " + myHandle.ToString();
}
Public Sub MyHandle()
   ' Gets the current input language.
   Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
       
   ' Gets a handle for the language  and prints the number.
   Dim myHandle As IntPtr = myCurrentLanguage.Handle
   textBox1.Text = "The handle number is: " & myHandle.ToString()
End Sub

Si applica a

Vedi anche