D djks Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #1 一个值得关注的问题! 各位大侠,有没有办法让Label4.caption:=’请稍等’; 等待8秒钟,然后内 容更换为 Label4.caption:=’已完成’.
D dhl2001 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #3 如果不执行别的内容 就sleep(8000) 如果还有其它任务 就用TIMER来计算 复杂一点用多线程
老 老赵 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #4 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.Timer1Timer(Sender: TObject); begin label1.Caption :='已完成'; end; end.
unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.Timer1Timer(Sender: TObject); begin label1.Caption :='已完成'; end; end.
B Babylon5 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #5 .... label4.caption := 'please wait 8 seconds'; sleep(8000); label4.caption := 'completed';
没 没理头号 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #6 用TIMER啊 ,设个开关切换不就行了! procedure TForm1.Timer1Timer(Sender: TObject); begin iF(FLAG)THEN label1.Caption :='已完成' ELSE Label4.caption:=’请稍等’ end;
用TIMER啊 ,设个开关切换不就行了! procedure TForm1.Timer1Timer(Sender: TObject); begin iF(FLAG)THEN label1.Caption :='已完成' ELSE Label4.caption:=’请稍等’ end;
D djks Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-24 #7 各位大侠,我的想法是这样: 当label4.Caption :='快完成了............'; 然后form2.ShowModal; 我是这样做的,但总是出错,希望各位大侠帮忙修改: procedure TForm1.Timer1Timer(Sender: TObject); begin label4.Caption :='快完成了............'; sleep(1100); form1.hide; form2.ShowModal; form1.close; end;
各位大侠,我的想法是这样: 当label4.Caption :='快完成了............'; 然后form2.ShowModal; 我是这样做的,但总是出错,希望各位大侠帮忙修改: procedure TForm1.Timer1Timer(Sender: TObject); begin label4.Caption :='快完成了............'; sleep(1100); form1.hide; form2.ShowModal; form1.close; end;