求摇奖程序
请粘贴源码
请粘贴源码
解决方案 »
- delphi cxgrid 如何用
- 小白发帖问一不小白的问题~~~~~~~~~~~~~~~~~~~~~~
- 散分,累坏了,直接倒下了.....
- 一年了,散分
- 关于ListView点击了某行第一次触发OnSelectItem,第二次再次点击该行则无触发OnSelectItem事件问题。。
- 找资料:MRP-ERP管理技术(柳中冈写)(看了部分,感觉不错,建议想了解ERP的朋友可看下)
- 什么控件可以自动识别html,类似RichEdit和Memo?
- 那里有VC 的 DLL库 转 DELPHI DLL 库的软件
- 这个窗体为何老是显示,我该如何隐藏它,关于这个程序有什么好建议吗?
- 怎么用TTcpclient和TTcpserver组件进行数组传递和接收?
- 关于父子窗体的奇怪问题,不知是不是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;