project1.dpr
来自「Delphi实效编程百例的随书源代码 这是其中的程序控制部分」· DPR 代码 · 共 30 行
DPR
30 行
program Project1;
uses
Forms, Windows, Messages,
Unit1 in 'Unit1.pas' {Form1};
const
CM_RESTORE = WM_USER + $1000;
var
RvHandle : hWnd;
{$R *.RES}
begin
{If there's another instance already running, activate that one}
RvHandle := FindWindow('My Delphi program!', NIL);
if RvHandle > 0 then
begin
PostMessage(RvHandle, CM_RESTORE, 0, 0);
Exit;
end;
{Else, do the normal stuff}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?