Uredi

Deli z drugimi prek


ToolStripDropDown.ChangeUICues Event

Definition

Occurs when the focus or keyboard user interface (UI) cues change.

public:
 event System::Windows::Forms::UICuesEventHandler ^ ChangeUICues;
[System.ComponentModel.Browsable(false)]
public event System.Windows.Forms.UICuesEventHandler ChangeUICues;
[System.ComponentModel.Browsable(false)]
public event System.Windows.Forms.UICuesEventHandler? ChangeUICues;
[<System.ComponentModel.Browsable(false)>]
member this.ChangeUICues : System.Windows.Forms.UICuesEventHandler 
Public Custom Event ChangeUICues As UICuesEventHandler 

Event Type

Attributes

Examples

The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the ChangeUICues event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing MessageBox.Show with Console.WriteLine or appending the message to a multiline TextBox.

To run the example code, paste it into a project that contains an instance of type ToolStripDropDown named ToolStripDropDown1. Then ensure that the event handler is associated with the ChangeUICues event.

private void ToolStripDropDown1_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 ToolStripDropDown1_ChangeUICues(sender as Object, e as UICuesEventArgs) _ 
     Handles ToolStripDropDown1.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

Remarks

For more information about handling events, see Handling and Raising Events.

Applies to