做一个flag,gotfoucs,和lostfoucs分别标记,然后记录每次selectindex就可以了啊。

解决方案 »

  1.   

    for(int i=0;i<ListBox1.Items.Count;i++)
    {
       if(ListBox1.Items[i].Selected==true)
       {
          ListBox1.Items.RemoveAt(i);
          i--;
        }
    }
      

  2.   

    for(int i=this.ListBox1.Items.Count-1;i>=0;i--)
    {
    if(this.ListBox1.Items[i].Selected==true)
    {
    this.ListBox1.Items.Remove(this.ListBox1.Items[i]);
    }
    }
      

  3.   

    得到关键字的一个集合然后执行一个delete ... where field1 in yourcollection就可以了!yourcollection就是上面朋友说的方法可以得到的!