下面是具体的检测程序
unit Unit;
interface
uses
Windows Messages SysUtils Classes Graphics Controls Forms Dialogs
StdCtrls ExtCtrlsmmSystem;
type
TForm = class(TForm)
Edit: TEdit;
Edit: TEdit;
Edit: TEdit;
Button: TButton;
Button: TButton;
Timer: TTimer;
procedure FormCreate(Sender: TObject);
procedure ButtonClick(Sender: TObject);
procedure TimerTimer(Sender: TObject);
procedure ButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form: TForm;
actTimeactTime:Cardinal;
smmCountsTimerCountsPCount:Single;
hTimeID:Integer;
iTen:Integer;
proTimeCallBack:TFNTimeCallBack;
procedure TimeProc(uTimerID uMessage: UINT;
dwUser dw dw: DWORD) stdcall;
procedure proEndCount;
implementation
{$R *DFM}
//timeSetEvent的回调函数
procedure proEndCount;
begin
actTime:=GetTickCountactTime;
FormButtonEnabled :=False;
FormButtonEnabled :=TRue;
FormTimerEnabled :=False;
smmCount:=;
sTimerCount:=;
spCount:=;
timeKillEvent(hTimeID);
end;
[] [] [] []