chat.dpr
来自「思微POS连锁超市管理系统 (商业代码),几年前的东西了」· DPR 代码 · 共 36 行
DPR
36 行
program chat;
uses
Forms,
Windows,
main in 'main.pas' {frm_main},
fStrRep in 'fStrRep.pas',
setup in 'setup.pas' {frm_Setup};
{$R *.RES}
var
MutexHandle: THandle; //定义互斥句柄
//防止二次运行
begin
// whether existed
MutexHandle := CreateMutex(nil, TRUE, '局域网聊天室');
if MutexHandle <> 0 then
begin
if GetLastError = ERROR_ALREADY_EXISTS then
begin
MessageBox(0, '程序已经运行...',
'不好意思', mb_IconHand);
CloseHandle(MutexHandle);
Halt; // 'Halt' Is stop running the actual application.
end;
end;
Application.Initialize;
Application.Title := '局域网聊天室';
Application.HelpFile := '';
Application.Initialize;
Application.CreateForm(Tfrm_main, frm_main);
Application.CreateForm(Tfrm_Setup, frm_Setup);
Application.Run;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?