Results 1 to 2 of 2

Thread: Context Menu

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Karlsruhe, Germany
    Posts
    8

    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

  2. #2
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    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.
    Wind and waves resolves all problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width