InputLanguage.CurrentInputLanguage Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta la lingua di input per il thread corrente.
public:
static property System::Windows::Forms::InputLanguage ^ CurrentInputLanguage { System::Windows::Forms::InputLanguage ^ get(); void set(System::Windows::Forms::InputLanguage ^ value); };
public static System.Windows.Forms.InputLanguage CurrentInputLanguage { get; set; }
static member CurrentInputLanguage : System.Windows.Forms.InputLanguage with get, set
Public Shared Property CurrentInputLanguage As InputLanguage
Valore della proprietà
Oggetto InputLanguage che rappresenta la lingua di input per il thread corrente.
Eccezioni
La lingua di input non viene riconosciuta dal sistema.
Esempio
L'esempio di codice seguente ottiene e visualizza il nome della lingua di input corrente. Questo codice presuppone che textBox1 sia stata creata un'istanza di .
public:
void MyCurrentInputLanguage()
{
// Gets the current input language and prints it in a text box.
InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage;
textBox1->Text = String::Format( "Current input language is: {0}",
myCurrentLanguage->Culture->EnglishName );
}
public void MyCurrentInputLanguage() {
// Gets the current input language and prints it in a text box.
InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;
textBox1.Text = "Current input language is: " +
myCurrentLanguage.Culture.EnglishName;
}
Public Sub MyCurrentInputLanguage()
' Gets the current input language and prints it in a text box.
Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
textBox1.Text = "Current input language is: " & _
myCurrentLanguage.Culture.EnglishName
End Sub