You can use the following code on btnRight
if (listBox2.Items.Contains(listBox1.SelectedItem)== true)
{
MessageBox.Show("Duplicate Value");
}
else
{
listBox2.Items.Add(listBox1.SelectedItem);
i = 0;
i = listBox1.SelectedIndex;
listBox1.Items.RemoveAt(i);
}
I hope it will help you. :)
-MKB