📄 project1.dpr
字号:
program Project1;
uses
Forms,
windows,
Unit1 in 'Unit1.pas' {Form1};
Resourcestring
FMutex = 'Mutex_ONLY_ONE';
{$R *.RES}
var
hMutex: HWND;
iRet: integer;
begin
Application.Initialize;
hMutex := CreateMutex(nil,False,PChar(FMutex));
iRet := GetLastError;
if iRet <>ERROR_ALREADY_EXISTS then
begin
Application.CreateForm(TForm1, Form1);
Application.Run;
end;
ReleaseMutex(hMutex);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -