创建异形窗口[3]
摘要:本例效果图: 代码文件: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; p...
阅读全文
posted @
2008-04-30 17:23
万一
阅读(3411)
推荐(0) 编辑
创建异形窗口[2]
摘要:本例效果图: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedur...
阅读全文
posted @
2008-04-30 16:59
万一
阅读(3160)
推荐(0) 编辑
创建异形窗口[1]
摘要:本例效果图: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2:...
阅读全文
posted @
2008-04-30 16:15
万一
阅读(3977)
推荐(0) 编辑
判断一个对象是否存在, 谁更快?
摘要:判断一个对象是否存在(赋值)的三种办法如下: if obj nil then ... if Boolean(obj) then ... if Assigned(obj) then ... 通过下面的测试, 结论是 obj nil 最慢; Boolean(obj) 与 Assigned(btn) 相当! 测试图: 测试源码: unit Unit1; interface u...
阅读全文
posted @
2008-03-12 09:03
万一
阅读(8705)
推荐(0) 编辑
说到"计算器", 建议大家用它进行"进制转换"
摘要:博客上有很多地方需要进制转换, 特提示一下, 是不是太多余了?
阅读全文
posted @
2008-03-09 21:56
万一
阅读(4402)
推荐(0) 编辑
用鼠标获取任意窗口的句柄, 并把它当作"干儿子"
摘要:首先建议初学者不要在这些小的技巧上下太多功夫, 学好基础才是根本; 我的博客上这种东西不多, 这是大家讨论时, 话赶话赶出来的, 知道有这种可行性即可, 没有多少实用价值. 本例效果图: 此例回复来宾在 http://www.cnblogs.com/del/archive/2008/02/26/1081644.html 碰到的问题. 全部代码如下(测试时注意给主窗体焦点): uni...
阅读全文
posted @
2008-03-09 21:27
万一
阅读(8860)
推荐(3) 编辑
全局探色器
摘要:本例效果图: 此例回复 maxcool(我坚定的支持者与监督者, 离不开你呀!) 在 http://www.cnblogs.com/del/archive/2008/03/09/1096874.html#1097203 提出的问题. 全部代码如下: unit Unit1; interface uses Windows, Messages, SysUtils, Variants,...
阅读全文
posted @
2008-03-09 12:57
万一
阅读(3625)
推荐(0) 编辑
调用系统关于对话框
摘要:uses ShellAPI; procedure TForm1.AbortClick(Sender: TObject); begin ShellAbout(0, 'MySoft', 'Copyright (c) 2007-2008', Application.Icon.Handle); end;
阅读全文
posted @
2007-12-19 09:57
万一
阅读(2950)
推荐(0) 编辑
获取程序所在目录
摘要:procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(ExtractFilePath(ParamStr(0))); //获取程序所在目录 ShowMessage(ExtractFilePath(Application.ExeName)); //获取程序所在目录 ShowMessage(G...
阅读全文
posted @
2007-11-30 22:03
万一
阅读(6298)
推荐(0) 编辑
注册系统级热键
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); proce...
阅读全文
posted @
2007-11-29 13:20
万一
阅读(9049)
推荐(0) 编辑
打开网页
摘要:uses ShellAPI; procedure TForm1.Button1Click(Sender: TObject); begin //用IE打开 ShellExecute(Handle, 'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL); //用火狐打开 ShellExecute(Handle, 'ope...
阅读全文
posted @
2007-11-27 12:57
万一
阅读(6592)
推荐(1) 编辑