I have a ToolStrip.
The ToolStrip has a ToolStripDropDo wnButton with 3 ToolStripMenuIt ems
My question is how do I catch the click event ot these 3 ToolStripMenuIt ems?
I tried the below but it doesn't catch the events:
Private Sub LowPriorityTool StripMenuItem_C lick(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
NormalPriorityT oolStripMenuIte m.Click, _
HighPriorityToo lStripMenuItem. Click
'Declare an object of type ToolStripMenuIt em
Dim pMenuStripItem As ToolStripMenuIt em
'Now let's find out which menu item was clicked
pMenuStripItem = CType(sender, ToolStripMenuIt em)
etc. etc.
Should I first declare it as ToolStripDropDo wnButton? But then how do I get
the event of each ToolStripMenuIt em?
Thanks,
Adam
The ToolStrip has a ToolStripDropDo wnButton with 3 ToolStripMenuIt ems
My question is how do I catch the click event ot these 3 ToolStripMenuIt ems?
I tried the below but it doesn't catch the events:
Private Sub LowPriorityTool StripMenuItem_C lick(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
NormalPriorityT oolStripMenuIte m.Click, _
HighPriorityToo lStripMenuItem. Click
'Declare an object of type ToolStripMenuIt em
Dim pMenuStripItem As ToolStripMenuIt em
'Now let's find out which menu item was clicked
pMenuStripItem = CType(sender, ToolStripMenuIt em)
etc. etc.
Should I first declare it as ToolStripDropDo wnButton? But then how do I get
the event of each ToolStripMenuIt em?
Thanks,
Adam
Comment