摘要: 在Form放置一个ApplicationEvents控件, 在OnMessage事件中写下面的代码:uses ActiveXprocedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);const StdKeys = [VK_TAB, VK_RETURN, VK_DELETE, VK_BACK... 阅读全文
posted @ 2010-11-09 11:00 sunjun0427 阅读(1095) 评论(0) 推荐(0) 编辑
摘要: 学完这个你就成为excel高手了!(Delphi对Excel的所有操作)逐个试试!一)使用动态创建的方法首先创建Excel对象,使用ComObj:varExcelApp:Variant;ExcelApp:=CreateOleObject('Excel.Application');1)显示当前窗口:ExcelApp.Visible:=True;2)更改Excel标题栏:ExcelApp.Captio... 阅读全文
posted @ 2010-11-05 09:38 sunjun0427 阅读(1571) 评论(0) 推荐(0) 编辑
摘要: unitUnit1;interfaceusesWindows,Messages,SysUtils,Classes,Graphics,Controls,Forms,Dialogs,shellapi,//ADDshellapiAppEvnts,ImgList,Menus;constghy_tray=wm_user+2;typeTForm1=class(TForm)ApplicationEvents1:... 阅读全文
posted @ 2010-11-05 09:32 sunjun0427 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 你是否在寻找一些免费且多功能的 Delphi 组件为你的程序添加更强的功能?不用再寻找了,下面列出了在互联网上最好的一些 Delphi 组件,他们可是免费并且包含所有源代码的。(1)JEDI - VCLJEDI-VCL(JVCL) 库构建于 JEDI 社区捐赠的代码。他由超过 400 个可以在你的 Delphi 和 Kylix 项目中立即重用的组件构成。整个 JEDI VCL 在 Mozilla ... 阅读全文
posted @ 2010-11-05 09:29 sunjun0427 阅读(608) 评论(0) 推荐(0) 编辑
摘要: // ================================================================// 遍历某个文件夹下某种文件,// 使用说明//  _GetFileList(ListBox1.Items,'c:\*.doc');// _GetFileList(MyTStringList,'c:\*.exe');// ====... 阅读全文
posted @ 2010-11-05 09:24 sunjun0427 阅读(437) 评论(0) 推荐(0) 编辑
摘要: 用Delphi 通过 Soap toolkit 3.0调用webservice先安装MS Soap toolkit 3.0unit CallWebServiceByComObject;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Comobj, St... 阅读全文
posted @ 2010-11-04 15:18 sunjun0427 阅读(2646) 评论(0) 推荐(0) 编辑
摘要: uses Variants;VarToStr();如果返回的是一个数组的话varUTempPoint: Pointer;UOutArr: array[1..6] of string;//假设返回的是1维数组有6个元素begin UTempPoint := VarArrayLock(返回的OleVariant变量);//锁定输出变体数组 try Move(UTempPoint^,UOutA... 阅读全文
posted @ 2010-11-04 09:43 sunjun0427 阅读(3101) 评论(1) 推荐(0) 编辑
摘要: function MacAddress: string;var Lib: Cardinal; Func: function(GUID: PGUID): Longint;stdcall;GUID1, GUID2: TGUID;begin Result := ''; Lib := LoadLibrary('rpcrt4.dll'); if Lib <> 0 then begin if Wi... 阅读全文
posted @ 2010-10-21 14:45 sunjun0427 阅读(1387) 评论(0) 推荐(0) 编辑
摘要: 一些delphi开发的小技巧2008-04-22 21:16这是我从网上收集到的一些delphi开发的小技巧,现在与大家一起分享◇[DELPHI]网络邻居复制文件uses shellapi;copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false);◇[DELPHI]产生鼠标拖动效果通过Mous... 阅读全文
posted @ 2010-10-21 11:33 sunjun0427 阅读(657) 评论(0) 推荐(0) 编辑
摘要: 本例子为在Form1的Panel中显示Form2窗体,请注意例子中的reintroduce关键字//Form1 父窗体usesunit2;procedureTForm1.FormCreate(Sender:TObject);beginform2:=TForm2.Create(Panel,self);form2.BorderStyle:=bsNone;form2.WindowState:=wsMax... 阅读全文
posted @ 2010-10-21 11:30 sunjun0427 阅读(521) 评论(2) 推荐(0) 编辑