📄 project1.dpr
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -