showcount.pas

来自「《delphi数据库设计与实例开发》随书光盘」· PAS 代码 · 共 47 行

PAS
47
字号
unit ShowCount;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
  private
  QueryCount:Integer;
  ClientCount:Integer;
    { Private declarations }
  public
  Procedure UpdateClientCount(Incr:Integer);
  Procedure IncQueryCount;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
Procedure TForm1.UpdateClientCount(Incr:Integer);
begin
 ClientCount:=ClientCount+Incr;
 Label4.Caption:=IntToStr(ClientCount);
end;
Procedure TForm1.IncQueryCount;
begin
 Inc(QueryCount);
 Label5.Caption:=IntToStr(QueryCount);
end;



end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?