ToolStripControlHost.Validated 事件

定義

發生在託管控制成功驗證後。

public:
 event EventHandler ^ Validated;
public event EventHandler Validated;
public event EventHandler? Validated;
member this.Validated : EventHandler 
Public Custom Event Validated As EventHandler 

事件類型

範例

以下程式碼範例展示了此成員的使用方式。 在這個例子中,事件處理者會回報事件 Validated 的發生情況。 此報告能幫助您了解事件發生時間,並協助除錯。 若要報告多個事件或頻繁發生的事件,請考慮將MessageBox.Show訊息替換Console.WriteLine為或附加於多行TextBox

要執行範例程式碼,請將其貼到包含一個 ToolStripControlHost 名為 ToolStripControlHost1的實例的專案中。 然後確保事件處理程式與事件 Validated 相關聯。

private void ToolStripControlHost1_Validated(Object sender, EventArgs e) {

   MessageBox.Show("You are in the ToolStripControlHost.Validated event.");
}
Private Sub ToolStripControlHost1_Validated(sender as Object, e as EventArgs) _ 
     Handles ToolStripControlHost1.Validated

   MessageBox.Show("You are in the ToolStripControlHost.Validated event.")

End Sub

備註

如需處理事件的詳細資訊,請參閱 處理和引發事件

適用於

另請參閱