求摇奖程序
请粘贴源码
请粘贴源码
解决方案 »
- delphi xe imagelist png 图片 listview 显示 背景颜色怎么是黑色的
- 此段很简单的代码,但总是报错。
- 如何向指定的Word文件或模板中存在的表格中插入数据
- DLL调用问题
- 急救!!!ehlib怎么装??
- 请那一位大侠给一个关于api函数,参数,解释详细的说明文档!!
- 关于打印报表时如何使结果为0的字段不显示?
- 急,关于登陆时的问题(用的是adoconnect),请各位帮忙!!(我是菜鸟。)
- Delphi Server 页中的 有关 Excel的一组控件如何用啊?
- 请大虾给我一个学delphi的建议,谢谢。
- 关于父子窗体的奇怪问题,不知是不是DELPHI6的BUG?
- PageControl1.TabPosition:=tpBottom ;为什么不行
i : Integer ;
b : Boolean ;//先按 Button1 , 再显示中按 Button2 暂停,再按 Button2 循环procedure TForm1.Button1Click(Sender: TObject);
begin
while i < 31 do
begin
if b then
begin
Label1.Caption := IntToStr(i) ;
Application.ProcessMessages ;
Inc(i) ;
Sleep(1000) ;
end
else break ;
end ;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
if b then
begin
b := False ;
end
else
begin
b := True ;
Button1Click(Button1) ;
end ;
end;
你那样的程序我已搞定。
procedure TForm1.Timer1Timer(Sender: TObject);
var
IntA, IntB, IntC, IntD, IntE, IntF: Integer;
begin
Randomize;
IntA := Random(IntRange);
Panel1.Caption := IntToStr(IntA); IntB := Random(IntRange);
while (IntB = IntA) do
IntB := Random(IntRange);
Panel2.Caption := IntToStr(IntB); IntC := Random(IntRange);
while (IntC = IntA) or (IntC = IntB) do
IntC := Random(IntRange);
Panel3.Caption := IntToStr(IntC); IntD := Random(IntRange);
while (IntD = IntA) or (IntD = IntB) or (IntD = IntC)do
IntD := Random(IntRange);
Panel4.Caption := IntToStr(IntD); IntE := Random(IntRange);
while (IntE = IntA) or (IntE = IntB) or (IntE = IntC) or (IntE = IntD) do
IntE := Random(IntRange);
Panel5.Caption := IntToStr(IntE); IntF := Random(IntRange);
while (IntF = IntA) or (IntF = IntB) or (IntF = IntC) or (IntF = IntD) or (IntF = IntE) do
IntF := Random(IntRange);
Panel6.Caption := IntToStr(IntF); Panel7.Caption := IntToStr(Random(IntRange));
end;
在那个Button1Click中 ,Order By NewID() 取随机ID , 得到图片或路径
可以吗 ?
j,k : integer;
Data : Array[0..6] of integer;
Ok : Boolean;
begin
for j := 0 to 6 do
begin
Ok := false;
While Not Ok do
begin
Data[j] := Trunc(Random(35)+1);
Ok := True;
for k := 0 to j-1 do
begin
if Data[k] = Data[j] then
begin
Ok := false;
Break;
end;
end;
end
end;