关于ContextMenuStrip如何处理事件处理程序
ContextMenuStrip1.Items.Clear()If ContextMenuStrip1.SourceControl Is TextBox1 Then
ContextMenuStrip1.Items.Add("clear", New System.EventHandler(AddressOf Me.clear_onclick))
End If
If ContextMenuStrip1.SourceControl Is TextBox2 Then
ContextMenuStrip1.Items.Add("copy")
ContextMenuStrip1.Items.Add("paste")
End If
我向菜单添加了菜单项,如何向这些菜单项目里添加事件呢,在代码行的第三行 Me.clear_onclick因为不是FORM的成员报错该如何处理,