procedure TF_Login.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('对不起!Endo数据库软件重复运行,即将退出','重复运行',MB_OK); Application.Terminate; End; end; 测试通过!