private void Form1_Load(object sender, System.EventArgs e)
{
//コンテキストメニューを作成します
ContextMenu cm = new ContextMenu();
cm.MenuItems.Add("処理1", new System.EventHandler(this.a1));
cm.MenuItems.Add("処理2", new System.EventHandler(this.a2));
//SPREADに設定します
fpSpread1.ContextMenu = cm;
}
private void a1(object sender, System.EventArgs e)
{
//処理1
}
private void a2(object sender, System.EventArgs e)
{
//処理2
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
'コンテキストメニューを作成します
Dim cm As New ContextMenu
cm.MenuItems.Add("処理1", New System.EventHandler(AddressOf Method1))
cm.MenuItems.Add("処理2", New System.EventHandler(AddressOf Method2))
'SPREADに設定します
FpSpread1.ContextMenu = cm
End Sub
Private Sub Method1(ByVal sender As Object, ByVal e As System.EventArgs)
'処理1
End Sub
Private Sub Method2(ByVal sender As Object, ByVal e As System.EventArgs)
'処理2
End Sub