DelphiÉî¶È̽Ë÷Ö®×Ô¶¯Íê³ÉÍâ¿ÇÀ©Õ¹
ÒýÓÃ×Ô£ºhttp://develop.csai.cn/delphi/NO000001.htm
×Ô¶¯Íê³É¼ò½é
¡¡¡¡´ó¼ÒÒ»¶¨¶¼·Ç³£ÊìϤIEä¯ÀÀÆ÷µÄµØÖ·ÊäÈë±à¼¿ò£¬ËüÌṩÁË×Ô¶¯Íê³ÉµÄ¹¦ÄÜ¡£×Ô¶¯Íê³É£¨Auto Complete£©¹¦Äܼò»¯Á˱༿òµÄÊäÈ빦ÄÜ£¬Ëü¿ÉÒÔ¸ù¾ÝÒѾÊäÈëµÄ²¿·Ö×Ö·û´®½øÐÐÔ¤²âºÍÆ¥Å䡣ͼ2.7µÄÀý×Ó£¬ÑÝʾÁË×Ô¶¯Íê³É¿ÉÒÔÒÀ¾ÝÊäÈëµÄ“pro”£¬¸ø³öPascalµÄ±£Áô×ÖÖÐÓëÆäÏàÆ¥ÅäµÄ×Ö·û´®Áбí"procedure"¡¢"program"¡¢"property"¡£
¡¡¡¡ÔÚÀûÓÃ×Ô¶¯Íê³É¹¦ÄÜÇ°£¬±ØÐëÒªÖªµÀ×Ô¶¯Íê³É²¢²»ÊÇÈÎÒâ°æ±¾µÄWindows¶¼Ö§³Ö£¬×Ô¶¯Íê³É¹¦ÄÜʵ¼ÊÉÏÊÇÓÉInternet Explorer 4.0ÒýÈë²¢±ØÐëÓÐ4.71°æ¼°ÒÔÉϵÄShell32.dllµÄÖ§³Ö¡£ºÜ¶àÔçÆÚµÄϵͳ£¬°üÀ¨ºÜ¶à°²×°ÁËIE 4µÄϵͳ²¢²»Ö§³ÖÕâÏîÌØÐÔ£¬ËùÒÔʹÓÃ×Ô¶¯Íê³É¹¦ÄÜʱ±ØÐëÈ·±£Òª°²×°µÄϵͳ֧³ÖÕâÏÄÜ£¬Èç¹û²»Ö§³Ö¾ÍÐèÒª°²×°IEºÍ¼¯³ÉÍâ¿Ç¡£
¡¡¡¡×Ô¶¯Íê³É¹¦ÄÜÊÇͨ¹ýÒ»×éCOM½Ó¿ÚÀ´ÊµÏֵġ£ÕâЩ½Ó¿ÚʹÎÒÃÇ¿ÉÒÔÁ¬½Ó×Ô¶¯Íê³Éµ½±à¼¿ò£¬Ìí¼Ó±à¼¿ò¿ÉÒÔö¾ÙµÄ×Ö·û´®ÁÐ±í²¢ÅäÖÃÆäÏÔʾÊôÐÔ¡£
¡¡¡¡1. ×Ô¶¯Íê³ÉµÄÓÃ;
¡¡¡¡Ê¹ÓÃ×Ô¶¯Íê³É¹¦ÄÜ¿ÉÒÔÔöÇ¿³ÌÐòµÄÒ×ÓÃÐÔ£¬Ëü¿ÉÒÔ½ÚÊ¡Óû§·´¸´ÊäÈëһЩ³£ÓÃ×Ö·û´®µÄʱ¼ä£¬²¢¼õÉÙÊäÈë´íÎó¡£Ëü»¹¿ÉÒÔÓÃÓÚ²¿·Ö×Ö·ûÆ¥ÅäµÄ²éÕÒϵͳ£¬¿ÉÒÔÓÃËüʵÏÖ¶ÔÊý¾Ý¿âÄÚÈݵĿìËÙ²éÕÒ¡£ÁíÍ⣬Ëü»¹Ö§³ÖÏòä¯ÀÀÆ÷ÀúÊ·¡¢×î½üÔËÐгÌÐòºÍÍâ¿ÇĿ¼ÊäÈëµÈ¹¦ÄÜÖÐÌí¼Ó×Ô¶¨ÒåµÄÍê³ÉÁÐ±í¡£
¡¡¡¡2. ÅäÖÃ×Ô¶¯Íê³É
¡¡¡¡ÐèÒªÖªµÀµÄÊÇÔÚDelphiÀﲢûÓÐÌṩ×Ô¶¯Íê³É¹¦ÄÜÏà¹ØCOM½Ó¿ÚµÄpascalÉùÃ÷µ¥Ôª¡£ÓÉÓÚÒ»°ãÕâÀà½Ó¿ÚÔÚ΢Èí¶¼ÊÇÒÔCÓïÑÔµÄÍ·ÎļþÐÎʽÌṩ½Ó¿Ú£¬Delphi²»¿ÉÄܼ°Ê±Ìṩ×îеÄÏàÓ¦µÄPascal°ü×°µ¥Ôª¡£ËùÒÔΪÁËʹÓÃÕâÏÄÜ£¬±¾ÎÄÖжîÍâÌṩÁËÒ»¸öshlintfµ¥Ôª·ÒëÁËÏàÓ¦µÄÍ·ÎļþµÄÉùÃ÷¡£Ï±í×ܽáÁËShlintfµÄÄÚÈÝ£º
COM¶ÔÏó
½Ó ¿Ú
CLSID_AutoComplete
IAutoComplete
CLSID_ACLHistory
IAutoComplete2
CLSID_ACListISF
IACList
CLSID_ACLMRU
IACList2
CLSID_ACLMulti
ICurrentWorkingDirectory
IObjMgr
¡¡¡¡×Ô¶¯Íê³É¹¦ÄÜ×î»ù±¾µÄÒ»¸ö½Ó¿Ú¾ÍÊÇIAutoComplete½Ó¿Ú£¬ËüµÄÉùÃ÷ÈçÏ£º
type
IAutoComplete = interface(IUnknown)
[SID_IAutoComplete]
function Init(hwndEdit: HWND; punkACL: IUnknown; pwszRegKeyPath: PWideChar;
pwszQuickComplete: PWideChar): HResult; stdcall;
function Enable(fEnable: Boolean): HResult; stdcall;
end;
¡¡¡¡IautoComplete½Ó¿ÚÓÐÁ½¸ö·½·¨£ºInitºÍEnable¡£
¡¡¡¡Init·½·¨ÓÃÀ´°ÑIAut
Ïà¹ØÎĵµ£º
Ï£Íû´ó¼ÒÔÚתÌùµÄʱºò×¢Ã÷³ö´¦£¬Ð»Ð»)
ÓÃDELPHI¿ª·¢ÍøÂç´úÂëÒѾÓÐÒ»¶Îʱ¼äÁË£¡
ÎÒ·¢ÏÖÔÚÍøÉÏÓÃVCÀ´ÊµÏÖÍê³É¶Ë¿Ú£¨IOCP£©µÄ´úÂëºÜ¶à£¬µ«ÊÇʹÓÃDELPHIÀ´ÊµÏֵľͱȽÏÉÙÁË¡£¶ÔIOCP½²µÄÇå³þµÄ¾Í¸üÉÙÁË¡£ÔÚÕâÀïÎÒ°Ñ×Ô¼º±àдDELPHIϵÄIOCPд³öÀ´£¬Ï£Íû¶Ô¸ÕѧÍê³É¶Ë¿ÚµÄÅóÓÑÓиö°ïÖú¡£
Ê×ÏÈÎÒÃÇÀ´Á˽âһЩÔÚʹÓÃIOCPµÄʱºòÐèÒ ......
×î½üÔÚʹÓÃDelphi¿ª·¢Ò»ÖÖÓ¦ÓÃϵͳµÄ¼¯³É¿ª·¢»·¾³¡£ÆäÖÐÐèҪʵÏÖÒ»¸ö×Ö·û´®²ð·Ö¹¦ÄÜ£¬·½·¨»ù±¾ÔÐÍÓ¦¸ÃÊÇ£º
procedure
SplitString(src: string
; ch: Char; var
stringList: TStringList);
Ä¿µÄÊÇʹÓÃ×Ö·ûch²ð·Ösrc×Ö·û´®£¬°Ñ²ð·ÖµÄ½á¹û·ÅÈëstringListÖС£ÀýÈ磺src:='abc|def|ghi'; ch='|'µÄʱºò£¬·µ»ØµÄstringLis ......
1.SHIFT+Êó±ê×ó¼ü ÏÈÑ¡ÖÐÈÎÒ»¿Ø¼þ,°´¼üºó¿ÉÑ¡Öд°Ìå(Ñ¡Öпؼþºó°´EscЧ¹ûÒ»Ñù)
2.Shift+F8 µ÷ÊÔʱµ¯³öCPU´°¿Ú¡£ 3.Shift+F10 µÈÓÚÊó±êÓÒ¼ü£¨Windows¿ì½Ý¼ü£©¡£
4.Shitf+¼ýÍ· Ñ¡Ôñ 5.shift +F12 ¿ìËÙ²éÕÒ´°Ìå²¢´ò¿ª
6.F7 £¨²½½øʽµ÷ÊÔͬʱ׷×Ù½øÈë×Ó¹ý³Ì£© 7.F8 £¨²½½øʽµ÷ÊÔ²»½øÈë×Ó¹ý³Ì£©
8.F9 ÔËÐÐ 9.F12 Çл»EDITO ......
ÎÒÒ»¿ªÊ¼ÒÔΪ£¬½«±íµ¥ÉèÖÃΪÒþ²Ø£¬¿ÉÒÔÔÚ±íµ¥´´½¨Ê¼þÖм´FormCreate(Sender:TObject)È¥ÉèÖÃ
Òò´Ë£¬ ÎÒÔÚÕâ¸öprocedure TForm.FormCreate(Sender:TObject)ÖУ¬
ÏëÓÃÒ»ÏÂÁ½ÖÖ·½Ê½ÊµÏÖ
¼´£º
µ÷ÓÃ from.Hi ......
·þÎñ¶Ë£ºÌí¼ÓADOConnection£¬ADOQuery1£¬ADOQuery2¡£ÉèÖÃADOQuery1ΪÖ÷±í£¬ADOQuery2Ϊ´Ó±í¡£(ͨ¹ý ADOQuery2.SQL.Text:= 'select * from ´Ó±í where FKID=:Ö÷±íPKID'ÉèÖÃ)¡£Ìí¼ÓDataSetProvider1ºÍDataSetProvider2·Ö±ðÁ¬½Óµ½ADOQuery1ºÍADOQuery2¡£
¿Í»§¶Ë£ºÌí¼ÓClientDataSet1£¬ClientDataSet2¡£ClientDataS ......