//I use this event to get the mouse buttons: private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (listBox1.Items.Count > 0)//if List is NOT empty { if (e.Button == MouseButtons.Right){ //..?..
if (e.Button == MouseButtons.Right){
for (int i = 0; i < listBox1.Items.Count; i++) { listBox1.SelectedIndex = i; Delete(listBox1.Items[i]); // Your delete Code. }
if (listBox1.Items.Count >; 0)//if List is NOT empty {if (e.Button == MouseButtons.Right){ for (int i = 0; i < listBox1.Items.Count; i++) { listBox1.SelectedIndex = i; //Your Delete CODE! } } // Your delete Code. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)