'宣言 Public Event BeforeComponentReset As CancelEventHandler
public event CancelEventHandler BeforeComponentReset
イベント ハンドラが、このイベントに関連するデータを含む、CancelEventArgs 型の引数を受け取りました。次の CancelEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Cancel |
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolbars Private Sub UltraToolbarsManager1_BeforeComponentReset(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UltraToolbarsManager1.BeforeComponentReset Dim dr As DialogResult = MessageBox.Show(Me, "The toolbars manager component is about to be reset. Do you want to cancel the reset?", "Cancelable Toolbar Event", MessageBoxButtons.YesNo) If dr = DialogResult.Yes Then e.Cancel = True End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinToolbars; private void ultraToolbarsManager1_BeforeComponentReset(object sender, System.ComponentModel.CancelEventArgs e) { DialogResult dr = MessageBox.Show(this, "The toolbars manager component is about to be reset. Do you want to cancel the reset?", "Cancelable Toolbar Event", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) e.Cancel = true; }