还有个问题就是哪有delphi7的中文帮助啊?非常感谢!

解决方案 »

  1.   

    function TPPApp.CreateSingleton: Boolean;
    var
      hMutex: THandle;
    begin
      Result := False;  // Check whether another instance of the same exe is already running.
      // If is, restore its main form and exit.
      hMutex := OpenMutex(MUTEX_ALL_ACCESS, False, sPP_APP_MUTEX);
      if hMutex <> 0 then
      begin
        // If hMutex <> 0, another instance of the same app is running.  So shut
        // down the current instance and inform the other one to restore itself.
        // Don't forget to close handle when it is no longer required.
        CloseHandle(hMutex);
        RestoreMainForm;
        Exit;
      end;  // OK, this is the first instance, so create a new mutex to prevent multiple
      // instances of the same BC.
      hMutex := CreateMutex(nil, False, sPP_APP_MUTEX);
      if hMutex = 0 then
        RaiseLastWin32Error;  Result := True;
    end;
      

  2.   

    回复人: xuhx(一觉亮天) ( ) 信誉:100 同上,最好去看一下windows SDK