随笔分类 -  软件开发:Delphi

上一页 1 ··· 8 9 10 11 12
摘要:uses ... TLHelp32, ...; type TForm1 = class(TForm) ... end; var Form1: TForm1; l : Tlist; ////返回的东东在"L"这个TList中。 type TProcessInfo = Record ExeFile : String; ProcessID : DWORD; end; pProc... 阅读全文
posted @ 2010-04-11 18:39 Max Woods 阅读(321) 评论(0) 推荐(0)
摘要:unit TortoiseSVN2IDE;{$R 'icons.res'}interfaceuses ToolsAPI, SysUtils, Windows, Dialogs, Menus, Registry, ShellApi, Classes, Controls, Graphics, ImgList, ExtCtrls, ActnList,Forms;//增加了对Forms单元的引用const... 阅读全文
posted @ 2010-04-09 22:47 Max Woods 阅读(488) 评论(0) 推荐(0)
摘要:使用Delphi编写游戏,唯一没有C++方便的就是不支持运算符重载。当你编写有关向量或者矩阵计算的程序时,不支持运算符重载的Delphi使用起来是很费劲的。但是Delphi 2006改变了这种局面,新的Delphi内核已经支持运算符重载了!本文将介绍如何使用Delphi的运算符重载功能 注意:只有Delphi 2006 和 免费版的 Turbo Delphi 支持这一功能!Delphi for W... 阅读全文
posted @ 2010-03-16 12:02 Max Woods 阅读(1532) 评论(0) 推荐(0)
摘要:Delphi源代码下载{说明 LD(s,t:WideString):Integer 返回两个字符串的编辑长D= 编辑长L = 字符串中最长串的长度,当L=0时,L取1两个字符串的相似度=1 -D / L , 区间在0~1之间,0表示不相似,1表示完全相同}unit LDA;{Levenshtein Distance Algorithm}interfacefunction LD(s,t:WideString):Integer;implementationfunction Minimum(a,b,c:Integer):Integer;begin Result:=a; if b<Result 阅读全文
posted @ 2010-03-12 23:45 Max Woods 阅读(780) 评论(0) 推荐(0)
摘要:安装前请册除原有的FR控件。 1. "Tools|Environmet options..."中的"Library"标签面下"Library path"添加FastReport路径。 FastReport\FastQB FastReport\FastScript FastReport\Source FastReport\Source\BDEFastReport\Source\ADO FastRep... 阅读全文
posted @ 2010-03-07 19:07 Max Woods 阅读(2172) 评论(0) 推荐(0)
摘要:Delphi的VCL框架在创建应用时TApplication是一个自动创建的隐藏窗口,其它创建的窗口是自动以该窗口为窗口,这就导致创始的主窗口在任务栏的系统菜单只有三项,只要在主窗口的Create事件中将系统菜单用Application的系统菜单替换,并将SysCommand消息转发到主窗口就正常了。unit Unit1;interfaceuses Windows, Messages, SysUt... 阅读全文
posted @ 2010-02-17 20:28 Max Woods 阅读(639) 评论(0) 推荐(0)
摘要:使用时,需要Zlib.pas和 Zlibconst.pas两个单元文件,这两个文件保存在 Delphi 5.0安装光盘上 InfoExtrasZlib目录下,此外,在 InfoExtrasZlibObj目录中还保存了 Zlib.pas单元引用的 Obj文件,把这个目录拷贝到delphi的lib下,即可。可以适当的改动比如增加目录压缩和分文件压缩,其实就是在文件流前面增加一部分描述结构就是,不多说。... 阅读全文
posted @ 2010-02-10 12:40 Max Woods 阅读(2731) 评论(0) 推荐(0)
摘要:var si:STARTUPINFO; pi:PROCESS_INFORMATION;begin try FillChar(si,SizeOf(si),0); FillChar(pi,SizeOf(pi),0); si.cb:=SizeOf(si); Result:=CreateProcess(PChar(ExeFilePath),nil,nil,nil,False,0,nil,nil,si,pi); except Result:=False; end;end; 阅读全文
posted @ 2010-02-10 11:56 Max Woods 阅读(3006) 评论(0) 推荐(0)
摘要:// tabs = 2// -----------------------------------------------------------------------------------------------//// MD5 Message-Digest for Delphi 4//// Delphi 4 Unit implementing the// RSA Data Security, Inc. MD5 Message-Digest Algorithm//// Implementation of Ronald L. Rivest's RFC 1321//// Copyright 阅读全文
posted @ 2010-02-06 02:14 Max Woods 阅读(2063) 评论(0) 推荐(0)
摘要:unit Des;interfaceuses SysUtils;type TKeyByte = array[0..5] of Byte; TDesMode = (dmEncry, dmDecry); function DesEncryStr(Str, Key: String): String; function DesDecryStr(Str, Key: String): String; function DesEncryStrHex(Str, Key: String): String; function DesDecryStrHex(StrHex, Key: String): String 阅读全文
posted @ 2010-02-06 02:13 Max Woods 阅读(979) 评论(0) 推荐(0)
摘要:将工程转换到Delphi 6时,要将uses dsgnintf替换为uses designintf,designeditors.但如果是提示找不到can't find unit proxies.lpas,解决方法是将designide.dcp加入到required packages列表。你必确信运行时包不需要设计时包文件。Delphi 6中的这个变化是确保设计时编辑器被Borland 公司的许可更加严格地约束。 阅读全文
posted @ 2009-03-22 01:13 Max Woods 阅读(433) 评论(0) 推荐(0)
摘要:uses ShellAPI, ShlObj; procedure TForm1.Button1Click(Sender: TObject); var TitleName : string; lpItemID : PItemIDList; BrowseInfo : TBrowseInfo; DisplayName : array[0..MAX_PATH] of char; TempPat... 阅读全文
posted @ 2008-02-24 16:44 Max Woods 阅读(1414) 评论(0) 推荐(0)
摘要:Question and Answer DatabaseFAQ2748D.txt How do I create an icon from a bitmap?Category :Windows APIPlatform :AllProduct :All 32 bit Question:How do I create an icon from an bitmap?Answer:You must create two bitmaps, a mask bitmap (called the "AND"bitmap) and a image bitmap (called the XOR bitmap). 阅读全文
posted @ 2006-11-16 19:33 Max Woods 阅读(430) 评论(0) 推荐(0)
摘要:大多数Delphi程序员都像使用Visual Basic 那样使用他们手头上开发工具,而丝毫没有意识到Delphi的强大功能,更谈不上使用这些功能了。(写到这里,编辑惶恐的举起了手,怎么可能呢?)Delphi和Visual Basic不同,Delphi完全建立在面向对象结构上,这不仅影响到VCL的结构,而且影响到使用Delphi开发的每一个程序。 阅读全文
posted @ 2006-07-20 16:39 Max Woods 阅读(425) 评论(0) 推荐(1)
摘要:直接用下面的单元来取拼音吧:unit IMCode;(* 简化版拼音反查单元===================== 修改于 Trueway(TM) LiQunwei 修改者 2ccc.com ZhongWan 修改内容 去掉外挂字典,简化代码*)interfacefunction MakeSpellCode(stText: string; iMode, iCount: Integer): string;{ iMode 二进制功能位说明 X X X X X X X X X X X X X X X X 3 2 1 1: 0 - 只取各个汉字声母的第一个字母; 1 - 全取 2: 0 - 阅读全文
posted @ 2006-07-18 12:05 Max Woods 阅读(1927) 评论(0) 推荐(0)
摘要:此部分代码请大家给加上注释。const DEV_CLASS_NAME = 'Net'; DEM_CLASS_NAME = 'MEDIA'; DEC_CLASS_NAME = 'CDROM'; DEU_CLASS_NAME = 'USB'; DEP_CLASS_NAMW = 'ports'; UNKNOWN_DEVICE = '未知设备';private { Private declarations } DevState: Array of Boolean; procedure RefreshDevState; procedure EnumNetDevice; //获得 阅读全文
posted @ 2006-07-18 11:35 Max Woods 阅读(3244) 评论(0) 推荐(0)
摘要:几乎现在所有的X86 CPU都内置了CPUID指令以辨别真伪,一些CPU厂商例如AMD,VIA等还内置了更加丰富的扩展CPUID指令,用着更方便了。 阅读全文
posted @ 2006-07-18 11:23 Max Woods 阅读(2820) 评论(1) 推荐(0)
摘要:Delphi编写的Base64编码/解码单元 阅读全文
posted @ 2006-03-03 17:39 Max Woods 阅读(8901) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12