2009年5月30日

Delphi JEDI TJvLogFile


需先安裝 JEDI VCL for Delphi
在 Form 中
放入 Jv Non-Visual -> TJvLogFile

FileName = 'c:\log.txt'
AutoSave = True
SizeLimit = 1048576 //1M

放入 TTimer 元件,並加入 Timer1 OnTimer 事件

procedure TForm1.Timer1Timer(Sender: TObject);
begin
JvLogFile1.Add(DateTimeToStr(Now), 'Now', DateTimeToStr(Now));
end;

執行程式後,可用文字編輯器開啟 Log File 'c:\log.txt'

沒有留言:

網誌存檔