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());
}
}
引用: http://stackoverflow.com/questions/4454423/c-sharp-listbox-item-double-click-event
本文介绍了一个简单的C# ListBox双击事件处理程序示例。当用户双击ListBox中的项时,会显示一个消息框,提示用户所选中项的索引。


被折叠的 条评论
为什么被折叠?



