?? mainform.pas
字號:
unit MainForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
UM_CONNECT = WM_USER + 1;
type
TfrmMain = class(TForm)
lblConnections: TLabel;
private
{ Private declarations }
FConnections: Integer;
procedure UpdateConnections;
procedure UMConnect(var Msg: TMessage); message UM_CONNECT;
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
{ TfrmMain }
procedure TfrmMain.UMConnect(var Msg: TMessage);
begin
FConnections := FConnections + Msg.WParam;
UpdateConnections;
end;
procedure TfrmMain.UpdateConnections;
begin
if FConnections = 1 then
lblConnections.Caption := '1 connection'
else
lblConnections.Caption := IntToStr(FConnections) + ' connections';
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -