Listbox 实现Item双击事件

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

posted on 2016-08-02 21:36  norsd  阅读(1313)  评论(0编辑  收藏  举报

导航