procedure TForm1.SaveLog(sFlag:string;MSG:string);var QF1:Textfile; ----声明文本文件类型 Qfiletmp,sPath:string;begin try sPath :=ExtractFileDir(ParamStr(0))+'\Sajet_Log\'; if not directoryExists(sPath) then begin forcedirectories(sPath); end; Qfiletm…
uses WinTypes, WinProcs, Forms, Controls, Classes, Graphics; function CaptureScreenRect( ARect: TRect ): TBitmap; var ScreenDC: HDC; begin Result := TBitmap.Create; with Result, ARect do begin Width := Right - Left; Height := Bottom - Top; ScreenDC :…
原文地址 https://www.peganza.com/delphi-and-outputdebugstring.html Ever wanted to monitor your Delphi application in realtime, and be able to view log messages? Of course you can always run in full debug mode inside RAD Studio IDE. Another way is to outp…