var
lst:TStringList;
i:Integer;
begin
lst := TStringList.Create;
try
for i:= 1 to 37 do lst.add(IntToStr(i));
Randomize;
while ListBox1.Items.Count<7 do begin
i := Random(lst.Count-1)+1;
if i>=0 then begin
ListBox1.Itmes.add(lst[i]);
lst.delete(i);
end;
end;
finally
lst.Free;
end;
end;
随手写了一个;37选7;
以后这种问题还是尽量少问吧,没什么技术,纯粹就是简单的思路问题.看着让人觉得你们特别的懒;