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

Delphi定时Showmessage事件

在Delphi中,调用Showmessage后,如何使弹出的对话框在一秒钟后自动关闭,而不用手动去点确定
1:用timer控件的函数
procedure TForm1.Timer1Timer(Sender: TObject);
var
AHandle: THandle;
begin
AHandle := FindWindow('TMessageForm',
PChar(Application.Title));
if AHandle > 0 then
SendMessage(AHandle,
WM_CLOSE, 0, 0);
end;



相关文档:

delphi字符串转换为char数组

var
  arrChar : array [0..4] of Char;
  b : Byte;
  s : string;
begin
  s := 'Test';
  Move(Pointer(s)^, arrChar, Length(s));   //string to array of char
  ShowMessage(arrChar);
  b := Ord(s[1]);   //First byte string to one single byte ......

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, ......

Delphi中Format字符串说明

Delphi中Format字符串说明
function Format(const Format: string; const Args: array of const):
string;
Format字符串说明:
"%" [index ":"] ["-"] [width] ["." prec] type
(1)
格式化字符串必须以%开头
(2) [index ":"]
索引指的是Args参数列表中要显示的每一项的序号。比如:Args是
  ......

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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号