var i: Integer; begin i := 0; while i <= ListBox1.Count - 1 do begin if ListBox1.Selected[i] then ListBox1.Items.Delete(i) else Inc(i); end;