您现在的位置是:首页 >

74161设计模10计数器 利用Delphi建立精确计数器[2]

火烧 2022-09-17 14:53:13 1088
利用Del hi建立精确计数器[2]   下面是具体的检测程序  u it U it   i terface  u e   Wi dow Me age Sy Util Cla e Gra hic Co

利用Delphi建立精确计数器[2]  

  下面是具体的检测程序

  unit Unit ;

  interface

  uses

  Windows Messages SysUtils Classes Graphics Controls Forms Dialogs

  StdCtrls ExtCtrls mmSystem;

  type

  TForm = class(TForm)

    Edit : TEdit;

    Edit : TEdit;

    Edit : TEdit;

    Button : TButton;

    Button : TButton;

    Timer : TTimer;

    procedure FormCreate(Sender: TObject);

    procedure Button Click(Sender: TObject);

    procedure Timer Timer(Sender: TObject);

    procedure Button Click(Sender: TObject);

  private

    { Private declarations }

  public

74161设计模10计数器 利用Delphi建立精确计数器[2]

    { Public declarations }

  end;

 

  var

  Form : TForm ;

  actTime actTime :Cardinal;

  smmCount sTimerCount sPCount: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 :=GetTickCount actTime ;      Form Button Enabled :=False;

    Form Button Enabled :=TRue;

    Form Timer Enabled :=False;

    smmCount:= ;

    sTimerCount:= ;

    spCount:= ;

 

    timeKillEvent(hTimeID);

  end;

 

lishixinzhi/Article/program/Delphi/201311/25027  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码