Du kan prøve dette:
var
i,
iIndex: Integer;
slTemp: TStringList;
begin
slTemp := TStringList.Create;
slTemp.AddStrings(ListBox1.Items);
ListBox1.Clear;
ListBox1.Sort := False;
for i := 0 to slTemp.Count - 1 do
begin
Randomize;
iIndex := Random(slTemp.Count);
ListBox1.Items.Add(slTemp[iIndex]);
slTemp.Delete(iIndex);
end;
slTemp.Free
end;
-------------------------------------
I am AGAINST TCPA!!
[
http://www.againsttcpa.com/ ]
-------------------------------------
Mvh
DiZpel
[Redigeret d. 25/12-04 15:55:47 af DiZpel]