DelphiÔÚVasta/win 7Ï»ñȡȨÏÞ
±Ï¾¹Win32³ÌÐòµÄ¿ª·¢£¬Delphi»¹ÊÇÓÐÍçÇ¿µÄÉúÃüÁ¦µÄ¡£
²Ù×÷²½ÖèÈçÏ£º
1.½¨Á¢ res Îļþ
½¨Á¢Ò»¸öÎı¾Îļþ£¬Ãû×Ö¿ÉÒÔ×Ô¼ºÆð£¬ÎÒÕâÀï½Ð£ºUAC.manifest£¬ÄÚÈÝ£º
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
½¨Á¢Îı¾Îļþ£¬ÃûΪ UAC.rc£¬ÄÚÈÝ£º
1 24 UAC.manifest
±àÒë³É uac.res Îļþ£¬ÔËÐУº
brcc32 uac.rc -fouac.res
2.ÔÚ´úÂëÖÐÒýÈë
´ò¿ªÏîÄ¿Îļþ£¬¼ÓÈë
{$R uac.res}
3.±àÒë³ÌÐò
Õâʱ³ÌÐò¾ÍÖ§³Ö VISTA ÁË£¬ÔÚÔËÐеÄʱºò£¬»áµ¯³ö WINDOWS µÄÌáʾ¿ò£¬Ñ¯ÎÊÓû§ÊÇ·ñÔÊÐíÒÔ¹ÜÀíÔ±Éí·ÝÔËÐС£
ͨ¹ýÎÒ×Ô¼ºÊµ¼ù£¬ÔÚDelphi7ÏÂÃæÊÇ¿ÉÒԵ쬵«ÊÇÔÚDelphi2009ÏÂÃæ²âÊÔûÓÐͨ¹ý¡£
Ïà¹ØÎĵµ£º
32λDelphi³ÌÐòÖпÉÀûÓÃTRegistry¶ÔÏóÀ´´æÈ¡×¢²á±íÎļþÖеÄÐÅÏ¢¡£
¡¡¡¡Ò»¡¢´´½¨ºÍÊÍ·ÅTRegistry¶ÔÏó
¡¡¡¡1.´´½¨TRegistry¶ÔÏó¡£ÎªÁ˲Ù×÷×¢²á±í£¬Òª´´½¨Ò»¸öTRegistry¶ÔÏó£ºARegistry := TRegistry.Create£»
¡¡¡¡2.ÊÍ·ÅTRegistry¶ÔÏó¡£¶Ô×¢²á±í²Ù×÷½áÊøºó£¬Ó¦ÊÍ·ÅTRegistry¶ÔÏóËùÕ¼Äڴ棺ARegistry.Destroy¡£
¡¡¡¡¶þ ......
Ò»¡¢Formatº¯ÊýµÄÓ÷¨
FormatÊÇÒ»¸öºÜ³£Óã¬È´ÓÖËÆºõºÜ·³µÄ·½·¨£¬±¾ÈËÊÔͼ¶ÔÕâ¸ö·½·¨µÄ°ïÖú½øÐÐһЩ·Ò룬ÈÃËüÓÐÒ»¸öÍêÕûµÄ¸Åò£¬ÒÔ¹©´ó¼Ò²éѯ֮Óãº
Ê×ÏÈ¿´ËüµÄÉùÃ÷£º
function Format(const Format: string; const Args: array of const): string; overload;
ÊÂʵÉÏFormat·½·¨ÓÐÁ½¸öÖÖÐÎʽ£¬ÁíÍâÒ»ÖÖÊÇÈý¸ö²ÎÊýµÄ£¬Ö ......
Day ¿ªÍ·µÄº¯Êý
¡ñ
Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
ÃèÊö
ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö
Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£
ÀýÈ磺
showmessage(DateTimetostr(dateof(now())));
ÄãµÃµ½µÄÊÇ 2003/03/19
¶ø showmessage(Dat ......
ËùÔÚµ¥Ôª£º 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'  ......