Using the code below, I'm displaying a context menu item when the user right clicks the mouse over a listview. The problem is that the menu item appears in the top left corner of the screen. Not only is it not over the listview, it's not even over the form itself. It sits alone on the desktop in the upper left corner.
Anyhelp?
Anyhelp?
Visual Basic:
Private Sub lvwLeftList_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lvwLeftList.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
Me.cmnuStrip1.Show()
End If
End Sub
Private Sub cmnuSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmnuSelectAll.Click
Dim ListLeft As ListViewItem
For Each ListLeft In lvwLeftList.Items
ListLeft.Selected = True
Next
End Sub