-
Context Menu
Hallo,
I have some ListBoxes on a form which are all connected to one (the same) ContextMenu Control. When the Menu is clicked I get into the Sub:
Private Sub ContextMenuClear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuClear.Click
Here sender is the ContextMenu Object which has been clicked. Is there a way to get the information which ListBox it was that was right clicked on so I can clear only this ListBox?
Gunnar
-
Put your list boxes in a container and use the mousedown event (ByVal e As System.Windows.Forms.MouseEventArgs) to determine which listbox is at that point.