2016年9月5日

给 TTreeView 添加复选框

摘要: 1 //1.引用单元 2 uses Commctrl ; 3 4 //2.定义私有过程 5 procedure tvToggleCheckbox(TreeView: TTreeView;Node: TTreeNode;isclick:boolean =false); 6 procedure SetChecked(Node: TTreeNode; Check... 阅读全文

posted @ 2016-09-05 17:51 疯狂delphi 阅读(2976) 评论(0) 推荐(0) 编辑

跨进程发送消息数据

摘要: 1 //1.发送窗体 2 procedure TForm2.Button1Click(Sender: TObject); 3 var 4 h: HWND; 5 Size: Integer; 6 CopyDataStruct: TCopyDataStruct; 7 begin 8 h := FindWindow(nil, '接收窗口'); { 按标题查找目标窗... 阅读全文

posted @ 2016-09-05 17:47 疯狂delphi 阅读(1552) 评论(0) 推荐(0) 编辑

鼠标拖动虚影效果

摘要: PS: 1.form2是主窗体,form1是子窗体,我当时安装的是XE8,新建第一个窗体就是叫form2。 2.事件处理用到了控件(ApplicationEvents1)。 3.源代码下载地址:“https://download.csdn.net/download/zhujianqiangqq/75 阅读全文

posted @ 2016-09-05 17:45 疯狂delphi 阅读(763) 评论(0) 推荐(0) 编辑

delphi回调函数

摘要: 文章来源: http://anony3721.blog.163.com/blog/static/5119742010866050589/ 一.主单元 1 unit UnMain; 2 3 interface 4 5 uses 6 Winapi.Windows, Winapi.Messages, Sy 阅读全文

posted @ 2016-09-05 17:43 疯狂delphi 阅读(1632) 评论(0) 推荐(0) 编辑

单精度格式化函数

摘要: 1 //1.定义变量 2 Temp_F: real = 113.05; 3 4 //2.执行函数 5 procedure TForm1.Button1Click(Sender: TObject); 6 begin 7 Edit1.text :=FormatFloat('0.0',Temp_F); 8 end; 9 10 procedure TF... 阅读全文

posted @ 2016-09-05 17:41 疯狂delphi 阅读(543) 评论(0) 推荐(0) 编辑

delphi提示错误行号之Assert(断言)

摘要: 一、用法:Assert(表达式)1.如果为假 Assert会产生一个EAssertionFailed异常,显示为 Assertion Failed (C:/src/unit1.pas, [size=+0]line 34)2.如果不想再使用这些检查时,可以使用($ASSERTIONS OFF)或($C 阅读全文

posted @ 2016-09-05 17:39 疯狂delphi 阅读(1302) 评论(0) 推荐(0) 编辑

回车跳到下一个EDIT

摘要: 1.按下方法procedure TForm2.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if Key=VK_RETURN then SelectNext(ActiveControl,true,true 阅读全文

posted @ 2016-09-05 17:37 疯狂delphi 阅读(2407) 评论(0) 推荐(0) 编辑

像素转成毫米

摘要: mm:= Pixel / GetDeviceCaps(Canvas.Handle, LOGPIXELSX) * 25.4; 阅读全文

posted @ 2016-09-05 17:35 疯狂delphi 阅读(1639) 评论(2) 推荐(0) 编辑

delphi debug release区别是什么?

摘要: 1. 基础知识介绍: Debug编译:是为了便于程序调试,所以目标代码里附加有许多额外的东西。Release编译:是产品可作为正式拷贝发布了,已经不需要那些仅为调试而编译进去东西。 (在 Release 状态下发布的 dcu 或 exe 会更小、更优化.) 新建一个工程, Delphi 默认的是调试 阅读全文

posted @ 2016-09-05 17:34 疯狂delphi 阅读(1613) 评论(0) 推荐(0) 编辑

Delphi异形窗口之PNG

摘要: 1 //1.单元内容 2 unit UnitAlienForm; 3 interface 4 uses 5 Windows, Forms, Classes, Graphics; 6 //从文件加载PNG 7 procedure AlienForm_PNGFromFile(AForm : TForm; AFileName : String); 8 //从资源加载PNG ... 阅读全文

posted @ 2016-09-05 17:32 疯狂delphi 阅读(2155) 评论(0) 推荐(0) 编辑

WebBrowser实现编辑网页

摘要: 1 //1.显示网页 2 procedure TForm2.FormCreate(Sender: TObject); 3 begin 4 Panel1.Align := alTop; 5 CheckBox1.Anchors := [akTop, akRight]; 6 Button1.Anchors := CheckBox1.Anchors; 7 CheckBox1... 阅读全文

posted @ 2016-09-05 17:29 疯狂delphi 阅读(1420) 评论(0) 推荐(0) 编辑

父子窗体滚动条支持鼠标滚轮移动

摘要: 1 //作者: 415799952 追寻 2 // 513187410 疯狂→delphi 3 // 1746539685 dnyy 4 5 6 //1.设置哪个方向移动 7 procedure TForm1.BitBtn2Click(Sender: TObject); 8 begin 9 if bitbt... 阅读全文

posted @ 2016-09-05 17:25 疯狂delphi 阅读(1099) 评论(0) 推荐(0) 编辑

导航