I have a list box with some items. Is there anyway I can attach a double click event to each item?
Item 1 Item 2 Item 3
If i was to double
void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { int index = this.listBox1.IndexFromPoint(e.Location); if (index != System.Windows.Forms.ListBox.NoMatches) { MessageBox.Show(index.ToString()); } }
This should work...check