'宣言 Public Event BeforeApplicationMenuDropDown As CancelEventHandler
public event CancelEventHandler BeforeApplicationMenuDropDown
イベント ハンドラが、このイベントに関連するデータを含む、CancelEventArgs 型の引数を受け取りました。次の CancelEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Cancel |
Imports Infragistics.Win.UltraWinToolbars Private Sub UltraToolbarsManager1_BeforeApplicationMenuDropDown(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UltraToolbarsManager1.BeforeApplicationMenuDropDown Dim message As String = "The Application Menu is about to drop down. Would you like to cancel the drop down?" Dim result As DialogResult = MessageBox.Show(message, "Application Menu Dropping Down", MessageBoxButtons.YesNo) ' If the user chose to stop the application menu from dropping down, cancel the event. ' NOTE: This will be ignored unless UltraToolbarsManager.Office2007UICompatibility is false. If result = Windows.Forms.DialogResult.Yes Then e.Cancel = True End If End Sub
using System.Windows.Forms; using Infragistics.Win.UltraWinToolbars; private void ultraToolbarsManager1_BeforeApplicationMenuDropDown( object sender, CancelEventArgs e ) { string message = "The Application Menu is about to drop down. Would you like to cancel the drop down?"; DialogResult result = MessageBox.Show( message, "Application Menu Dropping Down", MessageBoxButtons.YesNo ); // If the user chose to stop the application menu from dropping down, cancel the event. // NOTE: This will be ignored unless UltraToolbarsManager.Office2007UICompatibility is false. if ( result == DialogResult.Yes ) e.Cancel = true; }