Êý×Öת»»´óдÈËÃñ±ÒµÄdelphiʵÏÖ
ÎÄÕÂÀ´Ô´£ºIT¹¤³ÌÐÅÏ¢Íø http://www.systhinker.com/html/09/n-12309.html
֮ǰÓÃAccess×÷Ò»¸öÓ¦Ó㬵«ÕÒ²»µ½»õ±Òת»»³É´óдÈËÃñ±ÒµÄ¹¦ÄÜ£¨µ±È»¿ÉÒÔͨ¹ýexcel ת»»£¬µ«²»ÔÚÒ»¸öÓ¦ÓÃÉÏ£¬·ÅÆú£©¡£ÒÔΪ±È½Ï¼òµ¥£¬×Ô¼ºÊÔд£¬ËÖªÓÃÁËÁ½¸öÍíÉÏ£¬²Å»ù±¾ÊµÏÖ£¬µ«Ã»ÓÐСÊýµã£¨Ôª£©ÒÔÏ»õ±ÒµÄת»»¡£Ò²Ã»ÓÐÕ×µÄÅжϡ£¶øÇÒ¶Ô×Ö·ûµÄºÏ·¨ÐÔҲûÓмìÑé¡£½ñÌìÓÐʱ¼ä£¬½«ÆäÍêÉÆһϡ££¨¿ÉÄÜ»¹»áÓп¼ÂDz»Öܵĵط½£©
˼·£º
1¡¢ÅжÏÊÇ·ñ´øÓÐСÊýµãµÄ½ð¶î£¬Èç¹ûÊÇ£¬¾ÍÕÒ³öСÊýµãËùÔÚÊý¾Ý¡£¸Ãλ×Ö·û²»½øÐÐת»»¡£
2¡¢Ð¡ÊýµãÇ°µÄ×÷ΪÕûÊý룬½øÐÐת»»¡£ÕûÊýλµÄÿһλ¶¼Óбíʾ½ð¶îµÄ¼¶±ð£ºÊ°¡¢°Û¡¢Çª¡£¶øÇÒ»¹ÓÐÍò¡¢Òڵļ¶±ð¡£
3¡¢Ð¡ÊýµãºóµÄ×÷Ϊ½Ç¡¢·Ö¡¢Àå´¦Àí¡£
4¡¢Èç¹ûÓÐÁ¬ÐøµÄÁ㣬ֻÏÔʾһ¸öÁã¡£Èç50006,ÏÔʾΪÎéÍòÁ㽡£Èç¹ûÊÇ·¢ÉúÔÚÊ°¡¢°Û¡¢ÇªÎ»£¬¸ÃÁ㻹Ҫȥµô¡£
view source
< id="highlighter_197338_clipboard" title="copy to clipboard" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="16" height="16" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash">
print?
000
function TForm1.changeRmb(const strRmb:string):string;
001
var
002
txt,strhighlevel:string;
003
i,n,m,ilen,ipos:Integer; //n¼Ç¼ÕûÊý²¿·Ö³¤¶È£¬m¼Ç¼·ÖÊý²¿·Ö³¤¶È
004
strarray,strlevel:array of string;
005
p:pchar;
006
ispoint:boolean;//ÅжÏÊÇ·ñÓÐСÊýµã
007
begin
008
ispoint:=false;
009
result:='';
010
ipos:=0;
011
m:=0;
012
txt:=Trim(strRmb);
013
i:=1;
014
p:=PChar(txt);
015
//È¥³ý¿ªÍ·µÄ0£¬ÒÔ¼°.
016
if ((txt[1]='0') and (txt[2]<>'.')) or (txt[1]='.') then
017
begin
018
ShowMessage('µÚ1λ²»ÄÜΪ0»òÕßÊÇ.£¬Í˳ö²Ù×÷');
019
exit;
020
end;
021
//¼ì²é×Ö·ûµÄºÏ·¨ÐÔ
022
while (i<
Ïà¹ØÎĵµ£º
1.Round£¨ËÄÉáÁùÈëÎåÁôË«£©
¹¦ÄÜ˵Ã÷£º¶ÔÒ»¸öʵÊý½øÐÐËÄÉáÎåÈë¡£(°´ÕÕÒøÐмÒËã·¨)
Àý£º
var
i, j: Integer;
begin
i := Round(1.5); // iµÈÓÚ2
j := Round(2.5); // jµÈÓÚ2
end;
ÔÚDelphiÖÐʹÓÃRoundº¯ÊýµÃµ½µÄ´ð°¸ÓÐʱÓëÎÒÃÇËùÔ¤ÆڵĻ᲻̫һÑù£º²ÉÓõÄÊÇËÄÉáÁùÈëÎåÁôË«¡£¼´µ±Éá»òÈëλ´óÓÚ»òСÓÚÎåÊ ......
ËäÊÇÔ´´£¬µ«ÊÇÊDzο¼¹ý±ðÈ˵Ä×÷Æ·£¬È»ºó×Ô¼ºÖØÐÂдµÄ£¬Ä¿µÄÊÇÒª¸ø³õѧÕßÒ»¸ö¸üÈÝÒ×Ã÷°×¡£
ÓÃDELPHI´´½¨DLLÎļþ£¬·â×°´°ÌåµÄʵÏÖ·½·¨ÊµÀý£º
¼´Ò»¸ö³ÌÐò²»ÔÙÊǵ¥Ò»µÄÒ»¸öEXEÎļþÁË£¬¶øÊÇÓÉÒ»¸öEXEÎļþ¼ÓN¸öDLLÎļþ×é³É£¬ÕâÑù×öµÄÔÒòÊÇ·½±ãÒÔºóµÄά»¤Óë¸üУ¬Ò²ÊÇ¿çƽ̨¿ª·¢µÄÖØÒªÒ»²½¡£
1£¬ ´ò¿ªDELPHI£¬Ð½¨Ò»¸öDl ......
//¶¨ÒåÈ«¾Ö±äÁ¿
public
{ Public declarations }
outlook,MailItem,Recipient:variant;
OutlookNameSpace:variant;
OutlookFolder:variant;
OutlookAttachment:variant;
//´´½¨´ò¿ªoutlook
procedure TForm1.CreateOutLook;
begin
try
outlook:=CreateOleObject('OutLook.app ......
Day ¿ªÍ·µÄº¯Êý
¡ñ
Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
ÃèÊö
ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö
Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£
ÀýÈ磺
showmessage(DateTimetostr(dateof(now())));
ÄãµÃµ½µÄÊÇ 2003/03/19
¶ø showmessage(Dat ......
====================================================
Delphi²Ù×÷ÎļþµÄÒ»°ã²½Ö裺
1£©¹ØÁªÎļþ£º
AssignFile(var F; FileName :string)£»
2£©³õʼ»¯Îļþ£º
Append(var F :Text);
//ֻд£¬ÓÚÎļþ×îºó×·¼ÓÊý¾Ý
Reset(var F [; RecSize :Word]);   ......