delphi ¿Ø¼þ°²×°
ÓÉÓÚ×é¼þÌṩµÄ·½Ê½²»Í¬£¬ËùÒÔ°²×°µÄ·½·¨Ò²ÊDz»Ò»ÑùµÄ£¬ÏÂÃæ¾ÍĿǰ³£¼ûµÄ¸÷ÖÖÐÎʽµÄ×é¼þµÄ°²×°·½·¨½éÉÜһϡ£
1¡¢Ö»ÓÐÒ»¸ödcuÎļþµÄ×é¼þ¡£dcuÎļþÊDZàÒëºÃµÄµ¥ÔªÎļþ£¬ÕâÑùµÄ×é¼þÊÇ×÷Õß²»Ïë°ÑÔ´Â빫²¼¡£Ò»°ãÀ´Ëµ£¬×÷Õß±ØÐë˵Ã÷´Ë×é¼þÊʺÏdelphiµÄÄÄÖÖ°æ±¾£¬Èç¹û°æ±¾²»¶Ô£¬ÔÚ°²×°Ê±¾Í»á³öÏÖ´íÎó¡£Ò²ÕýÊÇÒòΪûÓÐÔ´Â룬¸øÊ¹ÓÃÕß´øÀ´Á˲»±ã£¬ÄǾÍÊÇÒ»µ©delphi°æ±¾Éý¼¶£¬´Ë×é¼þ¾Í²»ÄÜÔÙʹÓÃÁË£¬µ±È»ÓеÄ×÷Õ߸ø³öÁ˼¸ÖÖ°æ±¾µÄdcuÎļþ£¬Óû§¸ù¾ÝÐèҪѡÔñʹÓá£ÕâÑùµÄ×é¼þµÄ°²×°·½·¨ÊÇ£ºÔÚcomponent²Ëµ¥ÖУ¬Ñ¡Ôñinstall component£¬ÔÚ¶Ô»°¿òÖеÄ"into existing package"Ò³ÖУ¬µ¥»÷“unit file name”ºóµÄ“browse”°´Å¥£¬ÔÚ´ò¿ªµÄÎļþ¶Ô»°¿òÖУ¬½«“ÎļþÀàÐÍ”É趨Ϊ*.dcu£¬ÕÒµ½Òª°²×°µÄdcuÎļþ£¬°´ok°´Å¥·µ»Ø"into existing package"Ò³ºóÔÙ°´ok°´Å¥¾Í¿ÉÒÔ°²×°ÁË¡£×¢Ò⣬´Ëʱdelphi»áÌáʾdclusr40.dpk½«±»Öؽ¨£¬ÊÇ·ñ¼ÌÐø£¬ok¾Í¿ÉÒÔÁË¡£ÕâÀïÊǽ«×é¼þ°²×°µ½dclusr40.dpk°üÖУ¬´Ë°ü´ÓÎļþÃûÉÏ¿ÉÒÔ¿´³öÊÇÓû§×Ô¶¨Òå×é¼þ°ü£¬ÏȰ²×°µ½Õâ¸ö°üÖаɣ¬ÏÂÃæÔÙ½²ÓйØ×¢ÒâÊÂÏî¡£°²×°Íê±Ï»áÓÐÒѾ½«×é¼þ×¢²áÍêµÄÌáʾÐÅÏ¢ÒÔ¼°°²×°µ½Äĸö×é¼þÒ³ÖеÄÐÅÏ¢µÈ£¬µ½
×é¼þÃæ°åÉÏ¿´¿´£¬Ò»°ã»á³öÏÖÒ»¸öеÄ×é¼þÒ³£¬ÆäÖÐÓиհ²×°µÄ×é¼þ¡£
2¡¢Ö»ÓÐ pasÎļþ»ò¼ÈÓÐpasÓÖÓÐdcuÎļþµÄ×é¼þ¡£ÕâÖÖ×é¼þÒòΪÓÐpasÎļþ£¬Ò²¾ÍÊÇ˵×÷ÕßÌṩÁËÔ´Â룬Õâ¾ÍºÃ°ì¶àÁË¡£°²×°µÄ·½·¨ºÍÉÏÃæÊÇÒ»ÑùµÄ£¬ÔÚÎļþÀàÐÍÖпÉÒÔÉ趨ΪdcuÒ²¿ÉÒÔÉ趨Ϊpas£¬½¨ÒéÉ趨Ϊpas£¬ÕâÑù¿ÉÓÃÄãµÄdelphiÖØÐ±àÒëһϣ¬¿´ÊÇ·ñ»á³öÏÖÎÊÌâ¡£delphiÉý¼¶ºóÖ»ÄÜÑ¡Ôñpas Îļþ°²×°£¬ÕâÑù²ÅÄÜÖØÐ±àÒ룬ʹµÃ×é¼þÄÜÊÊÓ¦ÐÂdelphi°æ±¾¡£ÕâÑùµÄ×é¼þÊǺÜÖµµÃʹÓõ쬏ù¾ÝÐÄÁåµÄ¾Ñ飬ûÓÐÔ´ÂëµÄ×é¼þ×îºÃ²»ÒªÊ¹Óã¬Ò»ÊÇ´æÔÚ delphi°æ±¾Éý¼¶ºóÎÞ·¨Ê¹ÓõÄÎÊÌ⣬ÔÙÕßµ±³ÌÐò³öÏÖÎÊÌâºóÓû§ÎÞ·¨µ÷ÊÔ×é¼þÀ´ÅжÏÊÇ·ñÊÇ×é¼þÖдæÔÚbug¡£
3¡¢ÓÐdpkÎļþµÄ×é¼þ°ü¡£´øÓÐdpkÎļþµÄ×é¼þ°üÒ»°ãÊÇÓжà¸ö×é¼þ¹¹³ÉµÄ£¬Ò²¾ÍÊÇ˵°²×°ºó»áÓжà¸ö×é¼þ¹©Ê¹Óã¬Èç¹ûÖ»ÓÐÒ»¸ö×é¼þ×÷ÕßÒ»°ã²»»áÖÆ³ÉdpkÎļþ£¬Ê¹ÓÃÉÏÃæµÄ·½Ê½·¢²¼¾Í¿ÉÒÔÁË¡£¶ÔÓÚÕâÑùµÄ×é¼þ°ü£¬Ò»°ãÀ´Ëµ»áÓÐÏêϸµÄ°²×°ËµÃ÷Îļþ£¬ÈçÉÏÃæÌáµ½µÄrxlib£¬ÓÉÓÚ×é¼þ¸´ÔÓÇÒ°²×°Ê±ÓÐÏȺó˳Ðò£¬×÷Õß²»Ìṩ°²×°ËµÃ÷Óû§¸ù±¾ÎÞ·¨ÕýÈ·°²×°¡£Èç¹ûûÓа²×°ËµÃ÷Îļþ£¬ÄÇôÓÃÏÂÃæµÄ·½·¨°²×°£ºÔÚfile²Ëµ¥Ï£¬Ñ¡Ôñ”open…”´ò¿ªdpkÎļþ(ÎļþÀàÐÍÁбí¿òÖÐÑ¡*.dpk)£¬ÔÚ³öÏÖµÄpack
Ïà¹ØÎĵµ£º
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, DB, ADODB, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button ......
µÚÒ»ÖÖ·½·¨,ʹÓÃSelectDirectory º¯Êý ,ÔÚShellApiÖÐ
procedure TForm2.BtSelectPathClick(Sender: TObject);
var
strCaption,strDirectory:String;
wstrRoot:WideString;
begin
strCaption:='ÕâÊÇä¯ÀÀÎļþ¼ÐµÄ˵Ã÷ÎÄ×Ö£¬¿ÉÒÔ¸ù¾ÝÐèÒª½ ......
delphi±àÂë¹æ·¶Îĵµ
Ŀ¼
1¡¢Ç°ÑÔ 3
2¡¢Ô´³ÌÐòÊéд¹æ·¶ 3
2.1ͨÓÃÔ´´úÂë¸ñʽ¹æ·¶ 3
2.1.1Ëõ½ø 3
2.1.2±ß¾à 3
2.1.3 Begin…EndÓï¾ä 3
2.1.4×¢ÊÍ 4
2.2 OBJECT PASCALÓï¾ä¸ñʽÊéд¹æ·¶ÓëÓ÷¨ 4
2.2.1À¨ºÅ 4
2.2.2±£Áô×ֺ͹ؼü×Ö 4
2.2.3¹ý³ÌºÍº¯Êý 5
2.2.4±äÁ¿ 5
2.2.5ÀàÐÍ 6
2.2.6Óï¾ä 6
2.2.7½á¹¹» ......
Windows API µÄÊý¾ÝÀàÐÍÓë Delphi Êý¾ÝÀàÐͶÔÕÕ±í
×÷Õߣºadmin À´Ô´£ºÎ´Öª ÈÕÆÚ£º2010-1-28 13:10:56 ÈËÆø£º43 ±êÇ©£ºAPI
µ¼¶Á£ºWindowsAPIµÄÊý¾ÝÀàÐÍÓëDelphiÊý¾ÝÀàÐͶÔÕÕ±í
Windows Êý¾ÝÀàÐÍ
Delphi Êý¾ÝÀàÐÍ
ÃèÊö
LPSTR
PAnsiChar
×Ö·û´®Ö¸Õë
LPCSTR
PAnsiChar
×Ö·û´®Ö¸Õë
DWORD
LongWo ......