SamKr
6/6/2015 - 3:05 PM

Show ListView Menu on right-mouseclick

Show ListView Menu on right-mouseclick

if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
    ListViewItem item = listView.GetItemAt(e.X, e.Y);
    if (item != null)
    {
        item.Selected = true;
        contextMenuStrip1.Show(listView , e.Location);
    }
}