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