خطأ في كود تشغيل برنامج اخر
#7
كود :
uses ShellApi; ... var    SEInfo: TShellExecuteInfo;    ExitCode: DWORD;    ExecuteFile, ParamString, StartInString: string; begin    ExecuteFile:='c:\Windows\Calc.exe';    FillChar(SEInfo, SizeOf(SEInfo), 0) ;    SEInfo.cbSize := SizeOf(TShellExecuteInfo) ;    with SEInfo do begin      fMask := SEE_MASK_NOCLOSEPROCESS;      Wnd := Application.Handle;      lpFile := PChar(ExecuteFile) ; { ParamString can contain the application parameters. } // lpParameters := PChar(ParamString) ; { StartInString specifies the name of the working directory. If ommited, the current directory is used. } // lpDirectory := PChar(StartInString) ;      nShow := SW_SHOWNORMAL;    end;    if ShellExecuteEx(@SEInfo) then begin      repeat        Application.ProcessMessages;        GetExitCodeProcess(SEInfo.hProcess, ExitCode) ;      until (ExitCode <> STILL_ACTIVE) or Application.Terminated;      ShowMessage('Calculator terminated') ;    end    else ShowMessage('Error starting Calc!') ; end;
لأستهلنّ الصعب أو أدرك المنى    فما انقادت الآمال إلاّ لصابر
[-] كل من 1 user says قال شكرا ل mobile على المشاركة المفيدة
  • bidaya
الرد


الردود في هذا الموضوع
خطأ في كود تشغيل برنامج اخر - بواسطة bidaya - 18-09-2017, 03:42 PM
RE: كود تشغيل برنامج اخر - بواسطة mobile - 18-09-2017, 08:09 PM
RE: كود تشغيل برنامج اخر - بواسطة bidaya - 18-09-2017, 08:50 PM
RE: خطأ في كود تشغيل برنامج اخر - بواسطة mobile - 19-09-2017, 07:29 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم