combining the handling of ToolStripMenuItem Click events

I will be using dozens of click events as per below. I would like to combine these into one but know which of the ToolStripMenuItems was clicked. How could I do that Thank you. -Greg

Private Sub FP4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FP4ToolStripMenuItem.Click

End Sub

Private Sub FP1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FP1ToolStripMenuItem.Click

End Sub



Answer this question

combining the handling of ToolStripMenuItem Click events

  • kanato

    Yes of course! Thank you Timothy... ! -greg
  • pradeep prabhu83

    You can use the "sender" argument to determine which menu item was clicked.
  • combining the handling of ToolStripMenuItem Click events