program PPrint; uses Forms, windows, Uprint in 'Uprint.pas' {frmPrint}, u_sys_progress in 'u_sys_progress.pas' {frm_sys_progress}, my_sys_function in 'my_sys_function.pas'; {$R *.res} var MutexHandle: THandle; begin MutexHandle := CreateMutex(nil, TRUE, '东胜打印管理系统'); if MutexHandle <> 0 then begin if GetLastError = ERROR_ALREADY_EXISTS then begin MessageBox(0, '东胜打印管理系统已经运行,请关闭再运行...','警告:', mb_IconHand); CloseHandle(MutexHandle); Halt; end; end; Application.Initialize; Application.Initialize; Application.Title := '东胜打印管理系统'; Application.CreateForm(TfrmPrint, frmPrint); Application.Run; end.