Delphi×é¼þ¿ª·¢½Ì³ÌÖ¸ÄÏ£¨1£©×é¼þ¿ª·¢¸ÅÊö
ÔÚ¿ª½²Ö®Ç°£¬Ê×ÏÈ£¬ÎÒ¼ÙÉèÄãÁ˽âʲôÊÇÃæÏò¶ÔÏó£¬Ê²Ã´ÊÇÀà¡£Èç¹û²»Á˽âµÄ»°£¬½¨ÒéÏÈÈ¥Á˽âÒ»ÏÂÏà¹Ø֪ʶ£¡
ÔÚDelphiÖУ¬×é¼þ£¬ÎÒÃÇ¿ÉÒÔ½«ËüÀí½âΪһ¸ö¸öµÄ·â×°ºÃÁ˵ŦÄܶÔÏó¿â£¬Ê¹ÓÃÕâ¸ö¿â£¬¾ÍÖ»Óüòµ¥µÄ¼¸¾ä´úÂ룬ÉõÖÁ½ö½ö¼òµ¥µÄÉèÖü¸¸öÊôÐÔ¾ÍÄÜʵÏÖijЩ
¹¦ÄÜ£¬ÎÒÃÇ¿ÉÒÔ½«×é¼þÏëÏó³ÉÈÕ³£Éú»îÖÐʹÓõÄijЩ¹¤¾ß£¬±ÈÈç˵ÊÕÒô»ú£¬ÎÒÃDz»±ØÁ˽âÆäÄÚ²¿¹¹Ô죬ֻÓÃÔÚ²¥·ÅÆ÷ÉϵãÒ»¸öÊÕÌý°´Å¥¾ÍÄÜÊÕÌý¹ã²¥¡£ÆäʵÕâ²»½ö½ö
ÊÇDelphi×é¼þ£¬DelphiµÄÖеĸ÷ÖÖ¶ÔÏó¿â¶¼ÊÇÈç´Ë£¬±ÈÈçTStingList£¬Ö»Óüòµ¥¼¸¾ä´úÂë¾ÍÄÜʵÏÖһЩ¹¦ÄÜ£¬×é¼þÓë¶ÔÏó¿â±¾ÖÊÏàͬ£¬Î¨Ò»
²»Í¬µÄ¾ÍÊÇ×é¼þͨ¹ýDelphiµÄIDE½Ó¿Ú×¢²áµ½ÁËIDEÖУ¬¿ÉÒÔ½øÐпÉÊÓ»¯µÄÉè¼Æ£¬¶øÆäËûµÄ¶ÔÏó¿â£¬ÐèÒªÎÒÃÇÊÖ¶¯´´½¨£¬È»ºóµ÷Óã¡
ÉÏÃæ¼òµ¥²ûÊöÁËÒ»ÏÂDelphiµÄ×é¼þµÄijЩÌØÐÔÒÔ¼°ÓëÆäËû¶ÔÏó¿âµÄһЩÇø±ð¡£ÏÂÃ棬ÔÛÔÚ˵˵DelphiµÄ×é¼þµÄ¹¹Ôì²ã´Î£¬Ëµµ½Õâ¸öÀàµÄ²ã´Î£¬ÓÐÒ»¸ö·Ç
³£ÓÐÃûµÄDelphi¶ÔÏó²ã´ÎͼµÄ£¨µ«ÊÇÎÒ²»ÏþµÃÔÚʲôµØ·½ÁË£¬ÓÐÐËȤµÄ¿ÉÒÔ×Ô¼ºËÑËÑ¿´£¬²»¿´Ò²²»Ó°ÏìÏÂÃæµÄ½²½â˵Ã÷£©¡£ÉÏÃæ˵ÁË£¬DelphiµÄ×é¼þÆä
ʵҲÊÇÒ»¸ö¶ÔÏó¿â£¬Ò²¾ÍÊÇÒ»¸öÀ࣬ÔÚDelphiÖÐËùÓжÔÏóµÄ»ùÀ඼ÊÇTObject£¬×é¼þµÄ×î×î×î»ùÀàÒ²ÊÇTObject£¬ÕâÀïÓÐÒ»¸öÀ´Ô´ÓÚÍøÂçµÄ²»Íê
ÕûµÄÀà½á¹¹Í¼
Õâ¸ö½á¹¹ÖÐ×é¼þµÄÀà²ã´ÎÓúÚÉ«´ÖÌå±ê¼Ç³öÀ´ÁË£¬Ò²¾ÍÊÇ
TObject---------->TPersistent------------>TComponent------------->TControl
TControlÓÖ¼ÌÐø·ÖÖ§
TPersistentÕâ¸öÀ࣬Õâ¸öÀàÊÇÒ»¸ö¿É³ÖÐø»¯µÄ¶ÔÏó¿â£¬Ö»Òª´ÓÕâ¸öÀà¼Ì³ÐÏÂÀ´µÄ£¬¶¼×Ô¶¯¾ß±¸ÁË´®Ðл¯µÄ¹¦ÄÜ£¬¿ÉÒԷdz£·½±ãµÄ¶ÁÈëÓëдÈëµ½Á÷£¬Õâ¸öÌØÐԾͷ½±ãÁË×é¼þÖеÄÊôÐÔÐÅÏ¢Äܷdz£·½±ãµÄ¼Ç¼µ½´°Ìå×ÊÔ´Îļþ¡£
TComponentÕâ¸ö¾ÍÊÇËùÓÐDelphi×é¼þµÄ»ùÀ࣬ËùÓÐÏëҪע²áµ½IDEÖ±½Ó½øÐпÉÊÓ»¯Éè¼ÆµÄ¶ÔÏó¿â£¬¶¼Òª´ÓÕâ¸öÀà¼Ì³Ð¡£
TComponentÌṩÁ˱ز»¿ÉÉÙµÄÐÅÏ¢ÒÔʹ×é¼þÄܹ»ÔÚDelphiµÄIDEÉÏÔË×÷¡£È»ºóTComponentÏÂÑÜÉú³öÁËTControlµÄÀ࣬Õâ¸öÀà
¾ÍÊÇËùÓеÄÔÚÔËÐÐÆÚ¼ä¿ÉÊӿؼþµÄ»ùÀ࣬±ÈÈçLabel,PanelµÈ£¬Ö»Òª´ÓTControl¼Ì³ÐÏÂÀ´£¬¾ÍÄÜʵÏÖÔËÐÐÆÚ¼ä¿ÉÊÓ»¯¡£Èç¹ûÖ±½Ó´Ó
TComponentÏòϼ̳еĻ°£¬ÄÇôÔÚÔËÐÐÆÚ¼ä¾Í²»¿É¼ûÁË£¬±ÈÈç˵TTimerµÈ¡£
TControlÀ࣬´ÓͼÉϿɼû£¬´ÓËû¿ªÊ¼ÓÖÓÐÁË·ÖÖ§ÁË£¬·ÖÁËTGraphicControl£¬TWinControl¡£ÏÈ˵
TWinControl£¬TWincontrol¾ÍÊÇWindows¿Ø¼þ¿âµÄ»ùÀ࣬Õâ¸öÀà·â×°Á˴󲿷ÖWindowsµÄÏûÏ¢ÏìÓ¦ÒÔ¼°´´½¨²ÎÊý¡£ÔÙÀ´¿
Ïà¹ØÎĵµ£º
DelphiÖÐ Roundº¯ÊýÓиöBug
Ò»µ©²ÎÊýÊÇÐÎÈç XXX.5ÕâÑùµÄÊýʱ
Èç¹û XXX ÊÇÆæÊý ÄÇô¾Í»á Round up
Èç¹û XXX ÊÇżÊý ÄÇô¾Í»á Round down
ÀýÈç Round(17.5)=18
µ«ÊÇ Round(12.5)=12
ÏÂÃæµÄº¯Êý¼´¿É¾ÀÕýÕâ¸ö Bug µ«ÊÇÊÇÁÙʱÐÔµÄ
Ö´ÐÐ DoRound(12.5) ½á¹ûΪ 13 ÕýÈ·
function DoRound(Value: Extended): Int64;
......
exit: Í˳öº¯ÊýÌå
abort: Óöµ½Òì³£,°²¾²´¦Àí,¾ÍÊDz»ÏÔʾ²»Ìáʾ
break: Í˳öµ±Ç°Ñ»·Ìå,°üÀ¨for ,while, repeatµÈÑ»·Ìå
continue: ½áÊøÑ»·Äڵı¾´Î´¦Àí,¼ÌÐø´ÓÑ»·ÌåµÄ¿ªÊ¼Î»ÖüÌÐøÖ´ÐÐ
Exit ÊÇÌø³öµ±Ç°´úÂë¿é£¬Ò²¾ÍÊǵ±Ç°º¯Êý£¬Ìø³öºóÊÇÒª¼ÌÐøÏòÏÂÖ´Ðеģ¨Èç¹ûÓкóÐø´úÂ룩¡£
Abort ÊÇ´Ó EAbort ¹ýÀ´µÄ£¬¿ÉÒÔ¼¤·¢ ex ......
×î½üÔÚµ÷ÊÔ´úÂë,·¢ÏÖÒ»¸öÎÊÌâ.Ó¦¸ÃËãÊÇbug°É. ºÇ,Èç¹û²»Ëãbug,ÄǾÍÊÇÎÒ¶ÔÆäʵÏÖÔÀíµÄÎó½â.
Èç¹û°Ñ·µ»Ø²ÎÊýResult×÷ΪÁíÒ»º¯ÊýµÄÊäÈë²ÎÊý,resultµÄ³õÖµÊDz»È·¶¨...
function fun(str:string):string;
begin
fun2(result);
end; ......
MSHTMLÊÇ΢Èí¹«Ë¾µÄÒ»¸öCOM×é¼þ£¬¸Ã×é¼þ·â×°ÁËHTMLÓïÑÔÖеÄËùÓÐÔªËؼ°ÆäÊôÐÔ£¬Í¨¹ýÆäÌṩµÄ±ê×¼½Ó¿Ú£¬¿ÉÒÔ·ÃÎÊÖ¸¶¨ÍøÒ³µÄËùÓÐÔªËØ£®
¡¡¡¡MSHTML¶ÔÏóÄ£ÐÍÊÇÓÉһЩ¶ÔÏóºÍ¼¯ºÏ×é³ÉµÄ£®´¦ÓÚ¸ù²¿µÄÊÇHTML£¬ÃèÊöÁË´ò¿ªÒ³ÃæµÄ1¸ö´°¿Ú£¬°üÀ¨Ò»ÏµÁм¯ºÏºÍ¶ÔÏó¡£ÈçFrames¼¯ºÏ£¬History£¬Location£¬Navigator£¬Document£¬Vi—sum ......
Delphi UÅ̲åÈ벦³ö¼ì²â£º
1¡¢Ð½¨¹¤³Ì£»
2¡¢ÔÚform1ÉÏ·ÅÒ»¸öLabel£»
3¡¢¶¨ÒåÒ»¸ö˽Óйý³Ì
procedure WMDeviceChange(var Msg: TMessage); message WM_DEVICECHANGE;
ÍêÕû´úÂëÈçÏ£º
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics ......