易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi 创建目录及写日志文件


Delphi 创建目录及写日志文件
var
TF: TextFile;
LogFile: string;
txt :string;
sysDir:string;
//创建按钮
procedure TForm1.Button1Click(Sender: TObject);
begin
sysDir:=extractfilepath(application.ExeName );
if not directoryexists(sysdir+'log\') then
createdir(sysdir+'log\');
logfile:=sysdir+'log\'+formatdatetime('yyyymmdd',now)+'.txt';
end;
//写日志按钮
procedure TForm1.Button2Click(Sender: TObject);
begin
//assignfile(logfile,'log.txt');
AssignFile(tf,logfile);
if fileexists(logfile) then
append(tf)
else
rewrite(tf);
writeln(tf,'123');
closefile(tf);
end;


相关文档:

delphi dll 静态调用和动态调用方法总结

dll 调用方法有 静态调用和动态调用两种方法
用到的dll为上篇文章所编写的dll.
总结如下:
Unit Unit1;
Interface
Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
Type
  TForm1 = Class(TForm)
    Button1: TButton; ......

Delphi 相关记录

1、TStringList支持的最大行数是多少?(http://topic.csdn.net/t/20060209/14/4547405.html)
楼主结论:“TStringList的LoadfromFile函数应该只能读取15万行以内的数据,但TStringList和TList的Add函数可以加到几百万行(甚至更多)也不会出错。程序出错的原因应该是Add非法内存指针导致的,正如tanlim(求学者) &nb ......

改写了一个常用的DELPHI的加解密函数

DELPHI
//////////////////////////////////
Function   EncrypKey   (Src:String;   Key:String):string;
  var  
  idx   :integer;  
  KeyLen   :Integer;  
  KeyPos   :Integer; &nbs ......

delphi版MP3切割

好久没写BLOG了,送上一份原创的DELPHI版MP3切割,splitMp3为切割函数,支持按时间切割和按大小切割。望大家支持。
参考VC的资料编写的MP3切割DELPHI版单元.
unit UnitMp3DataUtil;
{
MP3 Cut Unit.
@author Jim Wu
2009-08
}
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号