我有一个 toolStripMenuItem,它是一个包含其他下拉项的菜单。当通过选择下拉项目之一引发 DropDownItemClicked 事件时,如果满足某些条件,我想使用该事件,如下所示:
Private Sub tsmi_DropDownItemClicked( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) _
Handles tsmi.DropDownItemClicked
...
If some_condition_is_satisfied then
e.Cancel = True <------ Cancel is not available in this event!
End If
...
End Sub
问题是 DropDownItemClicked 没有提供执行的可能性:
e.Cancel = True
那么我怎么能消费这个事件呢?