sanders720
Programmer
I've tried a couple of approaches to do this. I simply have a button to remove highlighted items from a ListBox. I am using C#.NET 2003
Thanksin advance for any help you can provide!
private void btnCopyFrom_Click(object sender, System.EventArgs e)
{
// foreach (string d in this.lstPCNamesApply.SelectedItems)
foreach (short i in this.lstPCNamesApply.IndexFromPoint(0))
{
// MessageBox.Show(d);
// this.lstPCNamesApply.Items.Remove(d);
MessageBox.Show(i);
this.lstPCNamesApply.Items.RemoveAt(i);
}
}
Thanksin advance for any help you can provide!
private void btnCopyFrom_Click(object sender, System.EventArgs e)
{
// foreach (string d in this.lstPCNamesApply.SelectedItems)
foreach (short i in this.lstPCNamesApply.IndexFromPoint(0))
{
// MessageBox.Show(d);
// this.lstPCNamesApply.Items.Remove(d);
MessageBox.Show(i);
this.lstPCNamesApply.Items.RemoveAt(i);
}
}