C
Co
Hi All,
I created a contextmenustrip which is connected to a listview.
Now I need some way to check if I right-clicked on a listview item
before calling the msgbox.
Right now I can click wherever on the listview it will always fire, if
there's an item or not.
Private Sub OpenToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
OpenToolStripMenuItem1.Click
MsgBox("Open")
End Sub
Private Sub EditToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
EditToolStripMenuItem1.Click
MsgBox("Edit")
End Sub
Private Sub DeleteToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DeleteToolStripMenuItem1.Click
MsgBox("Delete")
End Sub
Regards
Marco
I created a contextmenustrip which is connected to a listview.
Now I need some way to check if I right-clicked on a listview item
before calling the msgbox.
Right now I can click wherever on the listview it will always fire, if
there's an item or not.
Private Sub OpenToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
OpenToolStripMenuItem1.Click
MsgBox("Open")
End Sub
Private Sub EditToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
EditToolStripMenuItem1.Click
MsgBox("Edit")
End Sub
Private Sub DeleteToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DeleteToolStripMenuItem1.Click
MsgBox("Delete")
End Sub
Regards
Marco