procedure Tloginform.FormCreate(Sender: TObject);
var
    errno:integer;
    hmutex:hwnd;
begin
    hmutex:=createmutex(nil,false,pchar(application.Title));
    errno:=getlasterror;
    if errno=error_already_exists then
    begin
        application.MessageBox(' 您已经打开了该软件'+#13#13+' 请   不要再尝试'+#13#13+'您只能运行一个程序实例','不要试图打开多个',mb_ok);
        application.Terminate;
    end;
end;

相关文章:

  • 2021-10-24
  • 2022-01-12
  • 2022-01-20
  • 2022-12-23
  • 2021-05-27
  • 2022-01-27
  • 2022-12-23
  • 2021-10-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2022-01-01
相关资源
相似解决方案