バージョン 24.2 (最新)

BeforeApplicationMenuDropDown イベント

リボンのアプリケーション メニューが開く前に発生するキャンセル可能なイベント。
シンタックス
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
'宣言
 
Public Event BeforeApplicationMenuDropDown As CancelEventHandler
 
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;
}
'宣言
 
Public Event BeforeApplicationMenuDropDown As CancelEventHandler
 
参照