ÔÚdelphiÖÐÅжÏ×Ö·û´®ÊÇ·ñÊý×Ö£¬ÒÔ¼°¾«¶È´¦Àíº¯Êý
// ÅжÏÊÇ·ñÊÇÊýÖµÐÍ By yangxiao 2007.7.21
function isNumeric(strText: WideString): Boolean;
var
s: string;
i, l, p: Integer;
begin
Result := False;
l := Length(strText);
if l = 0 then Exit;
s := '';
for i:=1 to l do
begin
case strText[i] of
'0'..'9':
s := s + strText[i];
'E', 'e', '+', '-', '.':
begin
p := PosEx(strText[i], strText, i+1);
if p = 0 then
begin
case strText[i] of
'E', 'e':
if (i=1) or (i=l) then Exit;
'+', '-':
if i > 1 then
case strText[i-1] of
'E', 'e':
s := s + strText[i];
else
Exit;
end;
end;
end
else
Ïà¹ØÎĵµ£º
ËùÔÚµ¥Ôª£º DateUtils
Day ¿ªÍ·µÄº¯Êý
1¡¢DayOf()
ÃèÊö£º ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£ ÀýÈ磺 showmessage(DateTimetostr(dateof(now()))); ÄãµÃµ½µÄÊÇ 2003/03/19 ¶ø showmessage(DateTimetostr((now()))); µÃµ½µÄÊÇ
2¡¢DateTimeTostr()
ÃèÊö£º Da ......
Ò») ʹÓö¯Ì¬´´½¨µÄ·½·¨
Ê×ÏÈ´´½¨ Excel ¶ÔÏó£¬Ê¹ÓÃComObj:
var ExcelApp: Variant;
ExcelApp := CreateOleObject( 'Excel.Application'  ......
Delphi²Ù×÷×¢²á±í²½ÖèÈçÏ£º
-------------------------------------
1£©ÔÚUsesÖÐÌí¼ÓRegistryµ¥Ôª£»
2£©ÉùÃ÷TRegistry¶ÔÏó£»
3£©´´½¨TRegistry¶ÔÏó£»
4£©Ö¸¶¨¸ù¼ü£»
----------------try------------------
5£©´ò¿ªÐèÒª²Ù×÷µÄÖ÷¼ü£»
6£©¶Áд²Ù×÷£»
7£©±£´æ²¢¹Ø±ÕÖ÷¼ü£»
--------------finally----------------
......
Ï̵߳Ļù´¡ÖªÊ¶
Ï̵߳Ä×é³É¡£Ïß³ÌÓÐÁ½²¿·Ö×é³É¡£
1¡¢Ò»¸öÊÇÏ̵߳ÄÄں˶ÔÏ󣬲Ù×÷ϵͳÓÃËüÀ´¶ÔÏß³Ìʵʩ¹ÜÀí¡£Äں˶ÔÏóÒ²ÊÇϵͳÓÃÀ´´æ·ÅÏß³Ìͳ¼ÆÐÅÏ¢µÄµØ·½¡£
2¡¢ÁíÒ»¸öÊÇÏ̶߳ÑÕ»£¬ËüÓÃÓÚά»¤Ïß³ÌÔÚÖ´ÐдúÂëʱÐèÒªµÄËùÓк¯Êý²ÎÊýºÍ¾Ö² ......