Now to enable the listbox to allow select multiple items we need to set SelectionMode="MultiSimple".
Now let's genera the click event and add the below code.
C#.Net
private void btnTransferRight_Click(object sender, EventArgs e)
{
foreach (var item in new ArrayList(listBox1.SelectedItems))
{
listBox1.Items.Remove(item);
listBox2.Items.Add(item);
}
}
private void btnTransferLeft_Click(object sender, EventArgs e)
{
foreach (var item in new ArrayList(listBox2.SelectedItems))
{
listBox2.Items.Remove(item);
listBox1.Items.Add(item);
}
} VB.Net
Private Sub btnTransferRight_Click(sender As Object, e As EventArgs)
For Each item In New ArrayList(listBox1.SelectedItems)
listBox1.Items.Remove(item)
listBox2.Items.Add(item)
Next
End Sub
Private Sub btnTransferLeft_Click(sender As Object, e As EventArgs)
For Each item In New ArrayList(listBox2.SelectedItems)
listBox2.Items.Remove(item)
listBox1.Items.Add(item)
Next
End Sub
In above code on button click event first I have read all the selected item from the listbox. After that I have removed item the selected list and added to the next list. Here we are moving only single item from one list to another listbox. Now let's run the code to check the output.

