procedure TForm1.Button3Click(Sender: TObject); var i:integer; begin if listbox1.SelCount>0 then begin i:=0; repeat if listbox1.Selected[i] then begin listbox1.Items.Delete(i); i:=i-1; end; i:=i+1; until i=listbox1.Count; end;
procedure TForm1.Button3Click(Sender: TObject); var i:integer; begin if listbox1.SelCount>0 then for i:= listbox1.count - 1 downto 0 do if listbox1.Selected[i] then listbox1.Items.Delete(i); end;