Control.ChangeUICues イベント
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
フォーカスまたはキーボードのユーザー インターフェイス (UI) キューが変更されるときに発生します。
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
次のコード例では、このメンバーの使用方法を示します。 この例では、イベント ハンドラーがイベントの ChangeUICues 発生を報告します。 このレポートは、イベントが発生したタイミングを知るのに役立ち、デバッグに役立ちます。 複数のイベントまたは頻繁に発生するイベントを報告するには、 を Console.WriteLine に置き換えるかMessageBox.Show、複数行TextBoxにメッセージを追加することを検討してください。
コード例を実行するには、 や ComboBoxなどButton、 からControl継承する型のインスタンスを含むプロジェクトに貼り付けます。 次に、インスタンス Control1
に名前を付け、イベント ハンドラーがイベントに 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
イベントの処理の詳細については、「処理とイベントの発生」を参照してください。
製品 | バージョン |
---|---|
.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 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。