摘要: 代码编辑器:Home 回到当前行的头部End 回到当前行的尾部Insert 插入代码,覆盖后面的代码,(按回车无效), 再按撤回效果Delete 删除F1 双击一个单词后,按F1调用自带的Library 参考函数引用单元及用法F2 在Project上可... 阅读全文
posted @ 2015-11-28 14:38 王云盼 阅读(2043) 评论(0) 推荐(0) 编辑
摘要: 用delphi自带的sqr和sqrt函数procedure TForm2.SpeedButton3Click(Sender: TObject);begin ShowMessage(Sqr(6).ToString); //36end;procedure TForm2.SpeedButton4C... 阅读全文
posted @ 2015-11-28 11:46 王云盼 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 生成MAC地址的小工具:{*------------------------------------------------ 生成mac地址 @author @version 2015.7.2 2015.10.22修改 步长最大长度为256,必须为2的n次方 长度不超过5位数-----... 阅读全文
posted @ 2015-11-28 11:19 王云盼 阅读(449) 评论(0) 推荐(0) 编辑
摘要: delphi有提供十进制转换成十六进制的函数: IntToStr(); 返回值为String// 十进制转十六进制var i: integer; str: string;begin i := 255; ShowMessage(IntToHex(I, 2)); //FF ... 阅读全文
posted @ 2015-11-28 10:40 王云盼 阅读(322) 评论(0) 推荐(0) 编辑
摘要: var num: array of Integer; // 打比方 array里记录的是[5, 3, 2, 4, 1] =>要的到的结果为[1, 2, 3, 4, 5] i: Integer = 1; // i记录要比较数的位置 {首先明白字符串,比如'12345' ... 阅读全文
posted @ 2015-11-19 20:19 王云盼 阅读(207) 评论(0) 推荐(0) 编辑
摘要: (* ************************************************* 1、里面放多张图片,用文件名作为索引 2、线程在背后从硬盘加载到内存 3、批量加载 4、加载完成后执行回调,回调是线程安全的 5、回调中的参数是新加载了多少张图片****************... 阅读全文
posted @ 2015-11-19 09:50 王云盼 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 剪切bmp:效果为指定的rect大小,若图片比rect小,则会放大。都要uses Vcl.Imaging.jpeg;需要注意的是FMX里也需要jpeg的支持,虽然没引用编译器不会报错,但用到jpg时会报内存错误。procedure TForm1.Button1Click(Sender: TObjec... 阅读全文
posted @ 2015-11-17 20:34 王云盼 阅读(5831) 评论(0) 推荐(0) 编辑
摘要: 首先创建一个DLL文件,项目自带的代码为:library ProjectPnr;{ Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause A... 阅读全文
posted @ 2015-11-17 10:50 王云盼 阅读(3355) 评论(0) 推荐(0) 编辑
摘要: 书写格式: property Name: 类型 read (方法) write (方法) ; //default 可省略property Name: string read FName write SetName; // 读可以是函数也可以是变量property Name: string rea... 阅读全文
posted @ 2015-11-07 11:09 王云盼 阅读(272) 评论(0) 推荐(0) 编辑
摘要: private { Private declarations } FRow: Integer; procedure SetRow(const Value: Integer); public { Public declarations } property Row :... 阅读全文
posted @ 2015-11-06 15:23 王云盼 阅读(221) 评论(0) 推荐(0) 编辑