unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Timer1: TTimer;
function GetTickCount(): Integer;
constructor Create (AoWer : TComponent);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
mTime : Integer ;
VarPoint : Integer;
end;
var
Form1: TForm1;
implementation
constructor TForm1.Create (AoWer : TComponent);
begin
mTime := 0 ;
end;
{$R *.dfm}
function TForm1.GetTickCount(): Integer;
begin
Randomize;
Random (500);
if Result < 100 then
Result := 100;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled := True ;end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
mTime := mTime + 1 ;
if Timer1.Tag = 1 then // 我把这句话变成 if (0 <= mTime - GetTickCount) and (Timer1.Tag = 0) then 那么系统就没有反应了,如果不加,那么 label6.caption的值就为 -9700000多呀! 怎么回事?能告诉我为什么嘛?
begin
Label6.Caption := '' ; // 为什么当我运行的时候,他还是原来的数值!而不是空的?
Timer1.Tag := 0;
end;
if Timer1.Tag = 0 then
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.Enabled := False ;
Timer1.Tag := 1 ;end;end.
请高手们赐教!! 拜托了!!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Timer1: TTimer;
function GetTickCount(): Integer;
constructor Create (AoWer : TComponent);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
mTime : Integer ;
VarPoint : Integer;
end;
var
Form1: TForm1;
implementation
constructor TForm1.Create (AoWer : TComponent);
begin
mTime := 0 ;
end;
{$R *.dfm}
function TForm1.GetTickCount(): Integer;
begin
Randomize;
Random (500);
if Result < 100 then
Result := 100;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled := True ;end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
mTime := mTime + 1 ;
if Timer1.Tag = 1 then // 我把这句话变成 if (0 <= mTime - GetTickCount) and (Timer1.Tag = 0) then 那么系统就没有反应了,如果不加,那么 label6.caption的值就为 -9700000多呀! 怎么回事?能告诉我为什么嘛?
begin
Label6.Caption := '' ; // 为什么当我运行的时候,他还是原来的数值!而不是空的?
Timer1.Tag := 0;
end;
if Timer1.Tag = 0 then
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.Enabled := False ;
Timer1.Tag := 1 ;end;end.
请高手们赐教!! 拜托了!!
解决方案 »
- 想要实现以下数据表查询和更改功能:
- BDE如何动态配置数据源
- 用idhttp控件如何判断服务器已经开启
- 刚加入,没带什么礼物,向大家推荐一个vc编程站点吧!
- 在Windows Server 2003英文版下做的软件,在Windows XP中文版下运行中文部分都是乱码,怎样解决?
- TreeView应用的两个小问题(以后再多给分)
- 数据库类型---对Access的一些操作?
- 一个关于报表的问题
- 查找相同的名称
- 用POP3控件出现:=?big5?B?U2VhLkFpIFum46vYtdhd?= <[email protected]>
- 如何判断字符串的回车换行?
- 请问怎么使Enter键和向前的键失效???急急
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Timer1: TTimer;
function GetTickCount(): Integer;
constructor Create (AoWer : TComponent);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
mTime : Integer ;
VarPoint : Integer;
end;
var
Form1: TForm1;
implementation
constructor TForm1.Create (AoWer : TComponent);
begin
mTime := 0 ;
end;
{$R *.dfm}
function TForm1.GetTickCount(): Integer;
begin
Randomize;
Random (500);
if Result < 100 then
Result := 100;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled := True ;end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
mTime := mTime + 1 ;
if Timer1.Tag = 1 then
begin
Label6.Caption := '' ; // 为什么当我运行的时候,他还是原来的数值!而不是空的?
Timer1.Tag := 0;
end;
if Timer1.Tag = 0 then // 我把这句话变成 if (0 <= mTime - GetTickCount) and (Timer1.Tag = 0) then 那么系统就没有反应了,如果不加,那么 label6.caption的值就为 -9700000多呀! 怎么回事?能告诉我为什么嘛?
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.Enabled := False ;
Timer1.Tag := 1 ;end;end.
请高手们赐教!! 拜托了!!
begin
mTime := mTime + 1 ;
if Timer1.Tag = 1 then
begin
Label6.Caption := '' ; // 为什么当我运行的时候,他还是原来的数值!而不是空的?
Timer1.Tag := 0;
end
else if Timer1.Tag = 0 then
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;
begin
mTime := mTime + 1 ;
if Timer1.Tag = 1 then
begin
Label6.Caption := '' ; // 为什么当我运行的时候,他还是原来的数值!而不是空的?
Timer1.Tag := 0;
end
else if Timer1.Tag = 0 then
begin
Label6.Caption := IntToStr(mTime - GetTickCount() );
Form1.Color := clAqua ;
end;
end;换成这个也不行呀!!