来这儿看看:
http://www.c-sharpcorner.com/winforms/ListBoxDA001.asp

解决方案 »

  1.   

    用代码改一下所选行的brush颜色,用的时候按颜色区分是否选中!
      

  2.   

    我看了一下,选定单个用下面的应该可以,
    nSelectedIndex = this.listbox.SelectedIndex; 
    string szSelected = (string)this.listbox.SelectedItem; 
    this.textbox.Text = szSelected; 
    但是多个选项应该如何做。
    比如我写了下面的代码
    int index = listBox1.SelectedIndex;
    if (index != 0) 
    {
    for (int selectIndex = 0; selectIndex<listBox1.Items.Count; selectIndex++) 
    {
    label1.Text=listBox1.SelectedIndex.ToString();
    if(listBox1.Items[])//在这里我不知如何写,怎样表明哪行被选定了呢。是不是哪个属性为true????????
    {
    listBox2.Add(listBox1.SelectedItem);
    }
    }

    help me