DelphiµÄHashTable
{-----------------------------------------------------------------------------
Unit Name: HashTable
Author: LiuHeng
Date: 2010-04-13
Purpose: ·â×°DelphiµÄHashTable
History:
-----------------------------------------------------------------------------}
unit HashTable;
interface
uses
Classes,IniFiles;
type
THashTable = class(THashedStringList)
public
procedure AddStrItem(const ItemName: string;const ItemValue: string);
function ObjectValue(const ObjName: string): TObject;
end;
implementation
{ THashTable }
procedure THashTable.AddStrItem(const ItemName: string;const ItemValue: string);
begin
Add(ItemName+'='+ItemValue);
end;
function THashTable.ObjectValue(const ObjName: string): TObject;
var
AIndex: integer;
begin
Find(ObjName,AIndex);
if AIndex>=0 then
Result := Objects[AIndex];
end;
end.
Ïà¹ØÎĵµ£º
ÉÏһƪ£¬½éÉÜÁË×é¼þ¿ª·¢µÄÒ»°ã¸ÅÊö£¬ÒÔ¼°×é¼þÀà²ã´Î½á¹¹µÄ¸÷¸öÀàµÄ´óÖÂÐÅÏ¢£¡ÏÖÔھͿªÊ¼Í¨¹ýʵÀý½øÐÐÀ´¼òµ¥µÄ½²ÊöÒ»ÏÂÒ»°ã×é¼þµÄ¿ª·¢¹ý³Ì£¡ÎÒÕâÀïÏȲÉÓÃ×î
»ù±¾µÄ·½Ê½À´´´½¨Ò»¸ö×é¼þ£¡Ò²¾ÍÊÇʹÓÃDelphi×Ô¼ºµÄ×é¼þ¿ª·¢Ïòµ¼À´½¨Á¢Ò»¸öеÄ×é¼þ¡£ÔÚÕâÀÎÒÒÔÀ©³äTEditΪÀý½øÐн²½â¡£
ÄÇôÊ×ÏÈ£¬Òª½éÉܵľÍÊÇ ......
Delphi ÖÐ FindWindow ºÍ FindWindowEx µÄÓï·¨ºÍÓ÷¨
FindWindow(
lpClassName, {´°¿ÚµÄÀàÃû}
lpWindowName: PChar {´°¿ÚµÄ±êÌâ}
): HWND; {·µ»Ø´°¿ÚµÄ¾ä±ú; ʧ°Ü·µ»Ø 0}
//FindWin ......
µÚÒ»ÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION)));
µÚ¶þÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
function GetSystemTaskBarHeight:Integer;
var
R:TRect;
begin
SystemParametersInfo(SPI_GETWORKAREA,0,@R,0);
Resul ......
µÚÒ»ÖÖ·½·¨£º
µÚÒ»²½£º ÐÞ¸ÄÊôÐÔ
1¡¢kind -> dtktime Ò²¿ÉÒÔÊÇdtkdate µ«ÊÇÔÚÓÃdtkdateµÄʱºòÐèÒª½«datemodeÊôÐÔÐ޸ijÉdmUpDown
2¡¢parseinput -> true
µÚ¶þ²½£ºÔÚonUserInputʼþÖÐдһ¾ä´úÂë
DateTimePicker1.DateTime:=DateAndTime;
×¢£ºÒÔÉÏ·½·¨ËäÈ»¿ÉÒԴﵽĿµÄ£¬µ ......