DelphiÖÐFormat×Ö·û´®ËµÃ÷
DelphiÖÐFormat×Ö·û´®ËµÃ÷
function Format(const Format: string; const Args: array of const):
string;
Format×Ö·û´®ËµÃ÷£º
"%" [index ":"] ["-"] [width] ["." prec] type
(1)
¸ñʽ»¯×Ö·û´®±ØÐëÒÔ%¿ªÍ·
(2) [index ":"]
Ë÷ÒýÖ¸µÄÊÇArgs²ÎÊýÁбíÖÐÒªÏÔʾµÄÿһÏîµÄÐòºÅ¡£±ÈÈ磺ArgsÊÇ
['a',
'c']£¬ÄÇô'a'µÄË÷Òý¾ÍÊÇ0£¬¶ø'c'µÄË÷Òý¾ÍÊÇ1£¬¶øÇÒÓÉÓÚÖ»ÓÐ
Á½ÏËùÒԾͲ»»á³öÏÖ´óÓÚ1µÄË÷ÒýÖµ¡£
Format('%2:s %1:s %0:s', ['1st', '2nd',
'3rd']);
½á¹û£º'3rd 2nd 1st'
(3) ["-"]
Õâ¸ö±êʶ·ûµÄ×÷ÓÃÊǵ±ÒªÏÔʾµÄ×Ö·ûµÄ¸öÊýÉÙÓÚ[width]ʱ£¬ÔÚÓÒ±ßÌî²¹¿Õ¸ñ£»
Èç¹ûû¼ÓÉÏ["-"]£¬ÔòÔÚ×ó±ßÌî²¹¿Õ¸ñ¡£
Format('(%4s)', ['aa']); ½á¹û£º' aa'
(4) [width]
¿í¶È
¹æ¶¨ÁËÒªÏÔʾµÄ×Ö·ûµÄ¸öÊý¡£Èç¹ûÒªÏÔʾµÄ¿í¶È´óÓÚ[width]£¬Ôò°´Êµ¼ÊµÄ
¿í¶ÈÀ´ÏÔʾ£»·´Ö®£¬ÔòÌî²¹¿Õ¸ñ»ò°´ÒªÇóÌî²¹ÆäËü×Ö·û¡£
(5) ["." prec]
¾«¶È
ÕâÊÇÕë¶Ô¸¡µãÊýÀ´ËµµÄ£¬Ò»°ã¾ÍÊÇָСÊýµãºóµÄλÊý¡£
(6) type ÀàÐÍ(¼ûÏÂÃæ)
typeµÄ¿ÉÄÜÖµÓÐÏÂÁÐÕâЩ£º
(1) d
ÓзûºÅÊ®½øÖÆÊý
Args±ØÐëÊÇÓзûºÅÕûÐÍÊý¡£Èç¹ûÔÚ¸ñʽ»¯×Ö·û´®Öл¹¼ÓÈëÁË["."
prec]£¬ÔòÈç¹ûArgs
µÄ³¤¶ÈÈç¹ûСÓÚ¸ø³öµÄ¾«¶ÈÊýʱ£¬ÔÚÇ°±ßÌî²¹0£»Èç¹û´óÓÚ¾«¶ÈÊý£¬°´Êµ¼Ê³¤¶ÈÏÔÊ
Ïà¹ØÎĵµ£º
delphi ×¢²á com ¶ÔÏóµÄ·½·¨
procedure TForm1.Button3Click(Sender: TObject);
var
Sd: TSecurityDescriptor;
begin
InitializeSecurityDescriptor(@Sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(@Sd, true, Nil, false);
RegSe ......
1¡¢TStringListÖ§³ÖµÄ×î´óÐÐÊýÊǶàÉÙ£¿£¨http://topic.csdn.net/t/20060209/14/4547405.html£©
Â¥Ö÷½áÂÛ£º“TStringListµÄLoadfromFileº¯ÊýÓ¦¸ÃÖ»ÄܶÁÈ¡15ÍòÐÐÒÔÄÚµÄÊý¾Ý£¬µ«TStringListºÍTListµÄAddº¯Êý¿ÉÒÔ¼Óµ½¼¸°ÙÍòÐУ¨ÉõÖÁ¸ü¶à£©Ò²²»»á³ö´í¡£³ÌÐò³ö´íµÄÔÒòÓ¦¸ÃÊÇAdd·Ç·¨ÄÚ´æÖ¸Õëµ¼Öµģ¬ÕýÈçtanlim(ÇóѧÕß) &nb ......
http://meidi152.blog.163.com/blog/static/5423302009610103610744/
1. memo¿Ø¼þ¶ÁÈ¡txt
memo1.Lines.LoadfromFile('E:\*\*.txt');
2.
Procedure NewTxt(FileName:String);
Var
F : Textfile;
Begin
if fileExists(FileName) then DeleteFile(FileName); {¿´ÎļþÊÇ·ñ´æÔÚ,ÔÚ¾Í刪³ý}
AssignFile(F, ......
ÎÊÌâ±³¾°£º
¹«Ë¾Ï£ÍûʹÓÃMagentoÀ´½øÐнӵ¥£¬¶øºó°Ñ¶©µ¥µ¼Èëµ½Ò»¸öERPϵͳÖÐ(¶©µ¥´¦ÀíÒýÇæ)¡£
ÎÊÌ⣺
ÔÚʹÓÃWebService´ÓMagentoÖлñÈ¡PaymentÐÅϢʱ£¬ÐÅÓÿ¨ÊDZ»¼ÓÃܵÄ(·¨Âɹ涨²»ÔÊÐíÔÚÊý¾Ý¿âÖд洢ÐÅÓÿ¨µÄÃ÷ÎÄÐÅÏ¢)£¡
......
Ô×÷Õߣº¹âÃ÷ÐÖµÜ
×î½üÎÒÕýÔÚÑо¿ActiveX¼¼Êõ¡£ÎÒʹÓÃDelphi 7´´½¨ÁËÒ»¸ö¾ßÓÐActiveFormµÄActiveX¿Ø¼þÓ¦ÓóÌÐò¡£Õâ¸ö¿Ø¼þ²úÉúÒ»¸ö.OCXÎļþ¡£ÏÖÔÚ£¬ÎÒÐèÒª°ÑÕâ¸ö¿Ø¼þ²¿ÊðÔÚ·þÎñÆ÷¶Ë£¬ÔÚÓû§ä¯ÀÀÍøÒ³²¢Ñ¡Ôñ°²×°Õâ¸ö¿Ø¼þµÄʱºò£¬Óû§µÄIE²Å»áÏÂÔØ¡¢°²×°²¢ÏÔʾÕâ¸ö¿Ø¼þ¡£
µ«ÊÇÎҵĿؼþ±ØÐë×÷Êý×ÖÇ©ÃûÒÔºó£¬IE²Å»áÏÂÔØ°²×°¡£ ......