Make sure you hook the event up (and the ListBox is enabled):
private void Form1_Load(object sender, EventArgs e) { listBox1.MouseDown += new MouseEventHandler(listBox1_MouseDown); } void listBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { MessageBox.Show("Right Click"); } }
You can also configure the conductor for the event by selecting the ListBox and double-clicking on the MouseDown event in the Properties window (click on the zipper).
source share