Control.ChangeUICues Evento
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.
Si verifica quando lo stato attivo o i tasti di scelta rapida dell'interfaccia utente vengono modificati.
public:
event System::Windows::Forms::UICuesEventHandler ^ ChangeUICues;
public event System.Windows.Forms.UICuesEventHandler ChangeUICues;
public event System.Windows.Forms.UICuesEventHandler? ChangeUICues;
member this.ChangeUICues : System.Windows.Forms.UICuesEventHandler
Public Custom Event ChangeUICues As UICuesEventHandler
Nell'esempio di codice seguente viene illustrato l'uso di questo membro. Nell'esempio un gestore eventi segnala l'occorrenza dell'evento ChangeUICues . Questo report consente di apprendere quando si verifica l'evento e può essere utile per eseguire il debug. Per segnalare più eventi o eventi che si verificano spesso, è consigliabile sostituire MessageBox.Show con Console.WriteLine o aggiungere il messaggio a una multilinea TextBox.
Per eseguire il codice di esempio, incollarlo in un progetto contenente un'istanza di un tipo che eredita da Control, ad esempio un Button oggetto o ComboBox. Assegnare quindi un nome all'istanza Control1
e assicurarsi che il gestore eventi sia associato all'evento ChangeUICues .
private void Control1_ChangeUICues(Object sender, UICuesEventArgs e) {
System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "ShowFocus", e.ShowFocus );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ShowKeyboard", e.ShowKeyboard );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ChangeFocus", e.ChangeFocus );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ChangeKeyboard", e.ChangeKeyboard );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Changed", e.Changed );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "ChangeUICues Event" );
}
Private Sub Control1_ChangeUICues(sender as Object, e as UICuesEventArgs) _
Handles Control1.ChangeUICues
Dim messageBoxVB as New System.Text.StringBuilder()
messageBoxVB.AppendFormat("{0} = {1}", "ShowFocus", e.ShowFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ShowKeyboard", e.ShowKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeFocus", e.ChangeFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeKeyboard", e.ChangeKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Changed", e.Changed)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(),"ChangeUICues Event")
End Sub
Per ulteriori informazioni sulla gestione degli eventi, consultare gestione e generazione di eventi.
Prodotto | Versioni |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: