Me.ListBox1.BeginUpdate()
For index As Integer = 0 To Me.ListBox1.Items.Count – 1 Step 1
Me.ListBox1.SetSelected(index, Not Me.ListBox1.GetSelected(index))
Next index
Me.ListBox1.EndUpdate()
Me.ListBox1.BeginUpdate()
For index As Integer = 0 To Me.ListBox1.Items.Count – 1 Step 1
Me.ListBox1.SetSelected(index, Not Me.ListBox1.GetSelected(index))
Next index
Me.ListBox1.EndUpdate()