摘要: 获取当前系统版本号 unit WinVerUtils;{#===============================================================================# Name: WinVerUtils.pas# Author: Aleksander Oven# Created: 2007-02-25# Last Change: 2007-02-25# Version: 1.0# Description: All about the version of the Windows OS. Refere... 阅读全文
posted @ 2008-08-25 14:57 delphi中间件 阅读(400) 评论(0) 推荐(0)
摘要: 防止程序重复执行的单元 //工程引用此单元就能防止同时出现多个实例unit MultInst;interfaceuses Windows ,Messages, SysUtils, Classes, Forms;implementationconst STR_UNIQUE = '{2BE6D96E-827F-4BF9-B33E-8740412CDE96}'; MI_ACTIVEAPP = 1; {激活应用程序} MI_GETHANDLE = 2; {取得句柄}var iMessageID : Integer; OldWProc : TFNWndProc; MutHa... 阅读全文
posted @ 2008-08-25 14:55 delphi中间件 阅读(224) 评论(0) 推荐(0)
摘要: uses TypInfo; {获取类的信息, 需要这个单元}//获取对象的 RTTI 属性与事件的函数function GetPropertyAndEventList(obj: TObject; pList,eList: TStringList): Boolean;var ClassTypeInfo: PTypeInfo; {类的信息结构指针} ClassDataInfo: PTypeData; {类的数据结构指针} propertyList : PPropList; {TPropInfo 是属性的数据结构; PPropList 是其指针; TPropList 是属性结构指针的列表数组; PP 阅读全文
posted @ 2008-08-25 14:28 delphi中间件 阅读(338) 评论(0) 推荐(0)
摘要: 有序类型的大小及最大、最小值 procedure TForm1.Button1Click(Sender: TObject);var b: Byte; w: Word; i: Integer; c: Cardinal;begin ShowMessage(IntToStr(SizeOf(b))); //Byte大小:1 ShowMessage(IntToStr(High(b))); //Byte最大值: 255 ShowMessage(IntToStr(Low(b))); //Byte最小值: 0 ShowMessage(IntToStr(SizeOf(w))); ... 阅读全文
posted @ 2008-08-25 14:12 delphi中间件 阅读(578) 评论(0) 推荐(0)