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ÖÐDLL³õʼ»¯ºÍÍ˳ö´¦Àí
choysan
2010-01-08 8:56:43
<1>ÀûÓÃUnitµÄInitalizationÓëFinalizationÕâÁ½¸öС½Ú
¡¡¡¡¿ÉÒÔÔÚUnitµÄÕâÁ½¸öС½ÚÖа²ÅÅUnitµÄ½øÈëºÍÍ˳ö£¬µ«ÊÇ
ProgramÓëLibrary²¢Ã»ÓÐÕâÁ½¸ö²¿·Ö£¬ËùÒÔÖ»ÄÜдÔÚUnitÖС£
<2>ÀûÓÃExitProc±äÁ¿
¡¡¡¡ÔÚLibraryµÄbegin..end.ÖмäÊÇ¿ÉÒÔд´úÂëµÄ£ ......
1.¸ù¾Ý Delphi Ö¸Áî²Î¿¼ÊÖ²áÖÐ
˵Ã÷£º
Assigned º¯Ê½ÔÚ²ÎÊý²»Îªnilʱ´«»ØTrue,±íʾָÕëÒѾָµ½Ä³¸öÄÚ´æµØÖ·£¬Õâ¸öÄÚ´æµØÖ·¿ÉÄÜÊÇÒ»¸ö¶ÔÏóµØÊ×µØÖ·£¬Ò²¿ÉÄÜÔÚº¯Êý»ò¹ý³ÌÖУ¬ÉùÃ÷Ò»¸öÖ¸Õë±äÁ¿£¬Ã»Óи³ÖµÎªnil £¬ÎÞÂÒµÄÖ¸Ïòij´¦£¬ÕâÁ½¸öÖÖÇé¿ö£¬Assigned£¨Ö¸Õë±äÁ¿£©¶¼²»Îªnil , º¯Êý·Å»ØTrue£»
¶ø²ÎÊýΪnilʱÔò´«»ØFals ......
ÔÚ Delphi ÓïÑÔµÄÊý¾Ý¿â±à³ÌÖУ¬DBGrid ÊÇÏÔʾÊý¾ÝµÄÖ÷ÒªÊÖ¶ÎÖ®Ò»¡£µ«ÊÇ DBGrid ȱʡµÄÍâ¹ÛδÃâÏԵõ¥µ÷ºÍȱ·¦´´Òâ¡£Æäʵ£¬ÎÒÃÇÍêÈ«¿ÉÒÔÔÚÎÒÃǵijÌÐòÖÐͨ¹ý±à³ÌÀ´´ïµ½ÃÀ»¯DBGrid Íâ¹ÛµÄÄ¿µÄ¡£Í¨¹ý±à³Ì£¬ÎÒÃÇ¿ÉÒԸıä DBGrid µÄ±íÍ·¡¢Íø¸ñ¡¢Íø¸ñÏßµÄÇ°¾°É«ºÍ±³¾°É«£¬ÒÔ¼°Ïà¹ØµÄ×ÖÌåµÄ´óСºÍ·ç¸ñ¡£
......