随笔分类 - Delphi编程
摘要:用OpenDialog.FileName做参数 ExpandFileName() 返回文件的全路径(含驱动器、路径) ExtractFileExt() 从文件名中抽取扩展名 ExtractFileName() 从文件名中抽取不含路径的文件名 ExtractFilePath() 从文件名中抽取路径名
阅读全文
摘要:// // 函数名称: FindPathFiles// 功能描述: 找指定目录下的文件// 参 数: APath : 路径名称// APropty : 属性名称(*.* | *.txt)// AFiles : 文件列表// IsAddPath: 是否增加路径// 作者: // 时间: // 返 回
阅读全文
摘要:var Edit: TComponent;begin Edit := FindComponent("Edit1"); If Edit is TEdit then TEdit(Edit).Text := '你好 Delphi7';end; RTTI(RunTime Type Information):
阅读全文
摘要://SourceDirectort, DestinationDirectort 绝对路径 function ReNameDirectort(SourceDirectort, DestinationDirectort: string): Boolean;var pDirOperate: TSHFile
阅读全文
摘要:1.对于有句柄的控件,可以用一下代码interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls; type TForm1 =
阅读全文
摘要:1、'#0‘是两个字符。 2、Delphi中的nil 相当与C++中的null(0)。
阅读全文
摘要:win7 解决办法 win10 备注:/和-要对应,可以一位数显示和必须两位数显示要统一。
阅读全文
摘要:利用GetClass与RegisterClass可以实现根据字符串来实例化具体的子类,这对于某些需要动态配置程序的场合是很有用的。其他的应用如子窗体切换,算法替换等都能得到应用。 unit Example1; interface uses Windows, Messages, SysUtils, V
阅读全文
摘要:以下是他们的继承关系TControl-->TwinControl-->TbuttonControl-->Tbutton-->TBitBtn TControl-->TGraphicContron-->TSpeedButton TButton是普通标准按钮。他的功能你自己设定。TBitBtn是可以在按钮
阅读全文
摘要://Integer类型刚好是4个字节,ShortInt类型是1个字节,但是Windows中内存是4字节分配, //所以这里其实还是4个字节,用SizeOf可以看到这个record的大小是8字节,这样虽然浪 //费了空间,但是加快了速度(Windows内存分配中的边界对齐原理) TPerson = r
阅读全文
摘要:Delphi中类的published属性则是可以在属性列表中看到并使用的属性 公布成员(published)和公共成员(public)具有相同的可见度,但published中声明的会显示在属性栏,public 不会! published和public的限制访问属性是一样的 ;不过,published
阅读全文