   uhhm...  prevent apps from starting...
  i have a game with three editors...all different EXEsi have to get sure that only one of these is executed at once, means : if one of these is active another one shell detect this and close itself (with giving an error message)any suggestions?  
  Hi there,Use the followingvar  Mutex: THandle;begin  Application.Initialize;  Application.Title := ''AppTitle'';  //stop more than one instace running at a time  Mutex := CreateMutex(nil,True,PChar(''AppTitle''));  if GetLastError <> ERROR_ALREADY_EXISTS then  begin    Application.CreateForm(TfrmMain, frmMain);  end else begin    MessageDlg(''AppTitle program already running, application will be terminated'',mtError,[mbOk],0);  end;  ReleaseMutex(Mutex);  Application.Run;end.  ;  thx, i''ll try that  ;  uhmmm.. wtf is a mutex?and this seems to prevend only an application from starting it self more than one time.. i need something that prevends it from starting when a completely diffent application is running  ;  Mutex is short for MUTual EXclusion.  A mutex object is often used to synchronize access to shared resources.  A mutex has a name associated with it.  If you try to create a mutex with a name that already exists, you get a handle to the original mutex and the value returned by GetLastError is set to ERROR_ALREADY_EXISTS.  So, if you use the same mutex name in all three applications, then they will not start if any of the three applications is already running.I would also change the code to this.  Note the addition of the CloseHandle() call to free the mutex.var  Mutex: THandle;begin  // Create a mutex with a given name  Mutex := CreateMutex(nil, True, ''Zimond'');  // If the mutex did not already exist, then run normally  if GetLastError <> ERROR_ALREADY_EXISTS then  begin    Application.Initialize;    Application.CreateForm(TfrmMain, frmMain);    Application.Run;  end;  // Free the mutex and any resources used by it  CloseHandle(Mutex);end. Note that all three applications MUST use the same name in the call to CreateMutex for this to work properly.    Steve ''Sly'' Williams  Monkey Wrangler  Krome Studios;  Ahhhhhhhh!! now i got it  worked...thanks a lot  