第一句改成:listBox2.Items.Add(listBox1.SelectedItem.Text);
第一句改成:listBox1.Items.Remove(listBox1.SelectedItem.Text);

解决方案 »

  1.   


     //我试了,好用!
     private void button1_Click(object sender, System.EventArgs e)
    {
    listBox2.Items.Add(listBox1.SelectedItem);
    listBox1.Items.Remove(listBox1.SelectedItem);
    } :)
      

  2.   

    我在listBox的SelectedIndexChanged事件中
    listBox2.Items.Add(listBox1.SelectedItem.ToString());
    可以把listBox1选中的一项在listBox2中显示Refresh方法也不行
      

  3.   

    我想问一下你是在windows窗体中还是在web窗体中
      

  4.   

    同意上面的上面这位兄弟的说法
    在另一个button控件的click时间中是可以实现的
      

  5.   

    不行呀,我是在窗体中作的
    提示
    An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dllAdditional information: Can't modify the Items collection when the DataSource property is set.