复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20Interface Uses: Windows, Forms //登录Form OnCreate事件 if AppRunning = True then begin Application.MessageBox('对不起,程序已运行!', '提示', MB_OK + MB_ICONINFORMATION); Application.Terminate; end; function AppRunning: Boolean; var hMutex: HWND; ret: Integer; begin hMutex := CreateMutex(nil, False, PChar(Application.Title)); ret := GetLastError; Result := ret = ERROR_ALREADY_EXISTS; ReleaseMutex(hMutex); end;
最后
以上就是拉长仙人掌最近收集整理的关于delphi 设置程序不能同时打开多个的全部内容,更多相关delphi内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复