A
Adam Honek
I have a ToolStrip.
The ToolStrip has a ToolStripDropDownButton with 3 ToolStripMenuItems
My question is how do I catch the click event ot these 3 ToolStripMenuItems?
I tried the below but it doesn't catch the events:
Private Sub LowPriorityToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NormalPriorityToolStripMenuItem.Click, _
HighPriorityToolStripMenuItem.Click
'Declare an object of type ToolStripMenuItem
Dim pMenuStripItem As ToolStripMenuItem
'Now let's find out which menu item was clicked
pMenuStripItem = CType(sender, ToolStripMenuItem)
etc. etc.
Should I first declare it as ToolStripDropDownButton? But then how do I get
the event of each ToolStripMenuItem?
Thanks,
Adam
The ToolStrip has a ToolStripDropDownButton with 3 ToolStripMenuItems
My question is how do I catch the click event ot these 3 ToolStripMenuItems?
I tried the below but it doesn't catch the events:
Private Sub LowPriorityToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NormalPriorityToolStripMenuItem.Click, _
HighPriorityToolStripMenuItem.Click
'Declare an object of type ToolStripMenuItem
Dim pMenuStripItem As ToolStripMenuItem
'Now let's find out which menu item was clicked
pMenuStripItem = CType(sender, ToolStripMenuItem)
etc. etc.
Should I first declare it as ToolStripDropDownButton? But then how do I get
the event of each ToolStripMenuItem?
Thanks,
Adam