program Project1;uses Forms, Windows, //加入 Unit1 in 'Unit1.pas' {Form1};Resourcestring FMutex = '{E57D036C-8FBC-42BE-81DB-9F626B229052}'; //Ctrl+shift+G 得到{$R *.res}Var hMutex: HWND;begin HMutex := CreateMutex(Nil, False, PChar(FMutex)); if GetLastError = ERROR_ALREADY_EXISTS then Begin //Application.MessageBox(PChar('正在运行...'),'系统提示',64); ReleaseMutex(hMutex); Exit; End; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run;end.