07 2014 档案

WinAPI: GetKeyNameText - 根据键盘消息获取按键名称
摘要:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure Form... 阅读全文
posted @ 2014-07-28 18:17 9111 阅读(372) 评论(0) 推荐(0)
使用 {$INCLUDE} 或 {$I} 指令管理和调用自定义函数
摘要:这是一个简单、方便而又实用的小技巧. 譬如这段代码中有四个定义函数: MyAdd、MyDec、MyMul、MyDivunit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,... 阅读全文
posted @ 2014-07-28 18:10 9111 阅读(313) 评论(0) 推荐(0)
^ 符号的特殊用法
摘要:begin ShowMessage(IntToStr(Byte(^A))); {1} ShowMessage(IntToStr(Integer(^b))); {2} ShowMessage(IntToStr(Integer(^^))); {30} ShowMessage(IntToStr(Int... 阅读全文
posted @ 2014-07-25 22:16 9111 阅读(869) 评论(0) 推荐(0)
获取程序自身大小的函数
摘要:function GetExeSize: Int64;var SearchRec: TSearchRec;begin Result := -1; if FindFirst(Application.ExeName, faAnyFile, SearchRec) = 0 then Result := S... 阅读全文
posted @ 2014-07-24 11:03 9111 阅读(133) 评论(0) 推荐(0)
Delphi 的字符及字符串[6] - Char(AnsiChar)、WideChar 与其编码的相互转换
摘要://Char 类型与其编码值的转换:var b: Byte; c: Char;begin b := Ord('A'); {返回: 65} b := Ord(#65); {返回: 65} b := Ord($41); {返回: 65} b := Ord(#$41); {返回: 65} b := Byt... 阅读全文
posted @ 2014-07-24 11:01 9111 阅读(1435) 评论(0) 推荐(0)
编码符
摘要:begin#E760FCA2FAE65266BDD1FF6C0EFFC3F393884C05FC3A6DD28ADC5FF4C7F1B33E9D61FBA87215DE6943704303AA7FC173C86C02EA311540C99B08DA852FB79A9D53A3CE14EF524D7D 阅读全文
posted @ 2014-07-24 10:42 9111 阅读(1779) 评论(0) 推荐(0)
Delphi 的字符及字符串[5] - 字符串与 Windows API
摘要:先说赋值://赋值方法1: 给直接量begin SetWindowText(Handle, '新标题');end;//赋值方法2: 定义它要的类型var p: PChar;begin p := '新标题'; SetWindowText(Handle, p);end;//赋值方法3: 转换成它要的类型... 阅读全文
posted @ 2014-07-24 10:40 9111 阅读(152) 评论(0) 推荐(0)