I have a 'History' menu on the main menu in myformapp. When the form loads, the menu is populated with menuitems that come from text stored in an array of strings, sCommandArray().

The menu is populated using a for loop:

For iCounter = 0 To sCommandArray.GetUpperBound(0)
.m_mnuCommandHistory.MenuItems.Add(sCommandArray(iCounter), New EventHandler(AddressOf CommandHistoryClick))
next

The text of each menuitem is the contents of an array element.

The event handler, CommandHistoryClick, is declared as follows:

Private Sub CommandHistoryClick(ByVal Sender As system.object, ByVal e As System.EventArgs) Handles m_mnuCommandHistory.Click

End Sub

How do I determine which menuitem is the sender? I want to populate a text box with whichever menuitem is selected.