随笔分类 - 软件开发:Delphi
摘要:Delphi自带的TRegistry类只能实现注册表的基本操作,如果我们要实时监视注册表的变化或者扫描注册表特定项下的所有子项,TRegistry类就无能为力了。我啃了半天SDK,终于实现了Delphi对注册表的监视与扫描,不敢独享,拿来献给广大的Delphi爱好者。监视注册表相关项的改变要用到一个...
阅读全文
摘要:原文:http://blog.barrkel.com/2011/10/delphi-xe2-compiler-performance.htmlDelphi XE2 compiler performanceDelphi XE2introduced namespaces across the runtime library. This stressed unit name lookup inside the compiler, and led to some severe performance regressions in certain cases. So during the runup t
阅读全文
摘要:The Chilkat Spider component has disk caching capabilities. To setup a disk cache, create a new directory anywhere on your local hard drive and set the CacheDir property to the path. For example, you might create "c:/spiderCache/". The UpdateCache property controls whether downloaded pages
阅读全文
摘要:清除Windows图标缓存的代码:procedure RebuildIconCache;....const sr_WindowMetrics='Control Panel\Desktop\WindowMetrics\'; sr_ShellIconSize='Shell Icon Size';function WindowsDir:string;var buffer: array [0..255] of char;begin GetWindowsDirectory(@Buffer,SizeOf(buffer)); Result:=Buffer;end;Functi
阅读全文
摘要:(****************************************************)(* *)(* 编写:爱吃猪头肉 & Flying Wang *)(* 上面的版权声明请不要移除。 *)(* 2014-03-15 *)(* *)(****************************************************)找到 XE5 安装的 FMX.VirtualKeyboard.Andr...
阅读全文
摘要:更多电子书请到:http://maxwoods.400gb.com下载:Delphi XE5移动开发入门手册(完整版)
阅读全文
摘要:DateUtils.IsValidDateTimeDateUtils.IsValidDateDateUtils.IsValidTimeDateUtils.IsValidDateDayDateUtils.IsValidDateWeekDateUtils.IsValidDateMonthWeek//可用下面几个过程抛出异常:DateUtils.InvalidDateDayErrorDateUtils.InvalidDateMonthWeekErrorDateUtils.InvalidDateTimeErrorDateUtils.InvalidDateWeekErrorDateUtils.Inval
阅读全文
摘要:在最近版本的Delphi Pascal 编译器中,Round 函数是以 CPU 的 FPU (浮点部件) 处理器为基础的。这种处理器采用了所谓的 "银行家舍入法",即对中间值 (如 5.5、6.5) 实施Round函数时,处理器根据小数点前数字的奇、偶性来确定舍入与否,如 5.5 Round 结果为 6,而 6.5 Round 结果也为6, 因为 6 是偶数。 对于XXX.5的情况,整数部分是奇数,那么会Round Up,偶数会Round Down,例如:x:= Round(17.5) = x = 18x:= Round(12.5) = x = 12请使用下面的函数代替Ro
阅读全文
摘要:自格林威治标准时间1970年1月1日00:00:00 至现在经过多少秒数时间模块Uses DateUtils;当前时间:中国是 +8时区,换成UTC 就要减掉8小时showMessage(inttostr(DateTimeToUnix(now())-28800));
阅读全文
摘要:1. 确保正确安装Android SDK: 开始菜单> 所有程序 > Embarcadero RAD Studio XE5 > > Android Tools >打开 Android sdk manager下载包文件, 如果无法更新包文件,请在hosts文件中添加一行 74.125.31.136 dl-ssl.google.com 。2.确保正确配置AVD: Android SDK Manager > tools > manage AVDS(此时,你可以看到delphi 已经创建好一个虚拟设备) > edit: a. 选择适合你的API leve
阅读全文
摘要:delphi中单独编译pas生成dcu文件在网上下载了一个带源码的组件,结果碰到提示说缺少xxx.dcu。一看它的目录下确实没有,那能不能生成一个呢?当然可以!方法是使用delphi的安装目录\bin文件夹下的的dcc32.exe。例如:dcc32 myUnit.pas正常情况下运行上面的命令就会编译myUnit.pas生成 myUnit.dcu文件。(默认生成的.dcu是和.pas在同一文件夹下的)下附该命令的使用方法和详细说明(来自大富翁论坛网友帖子):DCC32的使用方法:文件介绍:Delphi7\Bin\DCC32.EXE:编译器(必要)Delphi7\Bin\rlink32.dll:
阅读全文
摘要:文章出处:http://www.informit.com/articles/article.aspx?p=24094In the preceding two chapters, I discussed dbExpress—a unidirectional database technology. In the real world, most applications support bidirectional scrolling through a dataset. As noted previously, Borland has addressed bidirectional datase
阅读全文
摘要:1 unit DateProcess; 2 interface 3 4 const 5 DayOfWeekStrings: array [1..7] of String = ('SUNDAY', 'MONDAY', 'TUESDAY', 6 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY'); 7 8 //: English Calendar Months - used for Month2Int 9 const 10 MonthString
阅读全文
摘要:这里先说说两个概念:Theme(主题)和 Visual Style 。Theme 最早出现在 Microsoft Plus! for Windows 95 中,是 Windows 中 Wallpaper、Cursors、Fonts、Sounds 、Icons 等的设置值集合。Visual Style 在 Windows XP 中才被引入,Visual Style 规定了 Contorls 的外观,另外还包括使用这些外观的一套 API 。使用 Visual Style 必须要 ComCtl32.dll 6,而 ComCtl32.dll 6 是不能被分发到以前版本的 Windows 中的,所以只能
阅读全文
摘要:合并两个 Wav 文件的函数实例一unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls;typeTForm1 = class(TForm)Button1: TButton;procedure Button1Click(Sender: TObject);end;varForm1: TForm1;implementation{$R *.dfm}{合并两个 Wav 文件的函数}function ConWavFile(AWav
阅读全文
摘要:更多VCL组件请到:http://maxwoods.400gb.com/u/758954/1974711DevExpress VCL 5.7:http://www.ctdisk.com/file/7500697(支持XE)DevExpress VCL 2011VOL 1.6:http://www.ctdisk.com/file/5487541(支持XE 2)DevExpress VCL 2011VOL 1.8:http://www.ctdisk.com/file/8571498(支持XE 2)DevExpress VCL 2011 VOL 2.4:http://www.ctdisk.com/f
阅读全文
摘要:Delphi XE 5 破解,有图有真相 EmbarcaderoRADStudioXE5 Update2 v19.0.14356.6604 (等待破解中...):http://altd.embarcadero.com/download/radstudio/xe5/delphicbuilder_xe5_upd2_win.iso hotfix_1_2_3_for_rad_studio_xe5_and_delphi_xe5_update_2 http://www.400gb.com/file/51926331 EmbarcaderoRADStudioXE5 Update 1(等待破解中...)htt
阅读全文
摘要:关于向Windows窗口发送Alt组合键的问题,这个真是经典问题啊,在网上找了一下,问的人N多,方法差不多,但就是没有很好解决问题。之前找到一个能正确发送的code:(Alt+A)PostMessage(hWnd,WM_SYSKEYDOWN,VK_MENU,0);PostMessage(hWnd,W...
阅读全文
摘要:1 program Project2; 2 3 uses 4 Windows, Native, JwaWinType, Unit_Driver; 5 6 function Is2KXp(): Boolean; 7 var 8 OSVer: TOSVersionInfo; 9 begin10 Result := False;11 OSVer.dwOSVersionInfoSize := Sizeof(TOSVersionInfo);12 if GetVersionEx(OSVer) then13 begin14 if (OSVer.dwPlatformId = VER_PLATFO...
阅读全文
摘要://使用IsDebuggerPresent这个API来检测是否被调试function FD_IsDebuggerPresent(): Boolean;beginif IsDebuggerPresent then Result := Trueelse Result := False;end;//使用查看PEB结构中标志位beingDegug来检测是否被调试function PD_PEB_BeingDebuggedFlag(): Boolean;beginasm mov @result, 0 mov eax, fs:[30h] //EAX = TEB.ProcessEnvironmentBlock
阅读全文
浙公网安备 33010602011771号