delphi×ÊÔ´ÎļþÖÆ×÷¼°Ê¹ÓÃÏê½â
Ò»¡¢Òý×Ó£º
ÏÖÔÚµÄWindowsÓ¦ÓóÌÐò¼¸ºõ¶¼Ê¹ÓÃͼ±ê¡¢Í¼Æ¬¡¢¹â±ê¡¢ÉùÒôµÈ£¬ÎÒÃdzÆËüÃÇΪ×ÊÔ´£¨Resource£©¡£×î¼òµ¥µÄʹÓÃ×ÊÔ´µÄ°ì·¨ÊÇ°ÑÕâЩ×ÊÔ´µÄÔ´Îļþ´òÈëÈí¼þ°ü£¬ÒÔ·½±ã³ÌÐòÐèÒªµÄʱºòµ÷Óá£×ÊÔ´ÊdzÌÐòµÄÒ»²¿·Ö£¬³ÌÐòÒªÕý³£ÔËÐоÍÀë²»ÁË×ÊÔ´Îļþ¡£µ«ÊÇËüÊDz»¿ÉÖ´ÐдúÂë¡£
ΪÁ˸üºÃµØ¹ÜÀí×ÊÔ´£¬DelphiÖÐÌṩÁËÒ»ÖÖ.RESÀàÐ͵Ä×ÊÔ´Îļþ¡£Ëü¿ÉÒÔ°ÑÎÒÃdzÌÐòÖÐËùÐèÒªµÄ×ÊÔ´ÕûºÏµ½Ò»¸ö×ÊÔ´Îļþ(.RES)ÏÂÀ´¡£ÔÚ±àÒëÓ¦ÓóÌÐòʱֱ½Ó±àÒë½øÁË¿ÉÖ´ÐгÌÐòÀ³ÉΪӦÓóÌÐòµÄÕûºÏÌå¡£
ÕâÑù×öµÄºÃ´¦ÊÇ£º1¡£ÓÉÓÚ¶¨Î»×ÊÔ´±ÈÔÚ´ÅÅÌÖж¨Î»Îļþ»¨·Ñʱ¼äÉÙ£¬ËùÒÔÓ¦ÓóÌÐòÖ´Ðлá¸ü¿ì¡£2¡£¶àÖÖ×ÊÔ´¿ÉÒÔ·ÅÔÚÒ»¸öÎļþÖУ¬¼õÉÙÁËͼ±ê¡¢Í¼Æ¬¡¢¹â±ê¡¢ÉùÒôµÈÎļþÊýÁ¿¡£²»ÓÃÅÂÓû§ÔÚʹÓùý³ÌÖеIJ»Ð¡ÐĶøËð»µÁË×ÊÔ´ÎļþÖÂʹ³ÌÐòÎÞ·¨Õý³£ÔËÐС£
ȱµãÊÇ£ºÒòΪ×ÊÔ´ÎļþµÄ¼ÓÈë´Ó¶ø¼Ó´óÁ˱àÒë³öµÄ¿ÉÖ´ÐгÌÐòµÄ×Ö½ÚÊý£¬µ±×ÊÔ´Îļþ½Ï´óʱ»áʹӦÓóÌÐò±äµÃ¿´ÆðÀ´ÓºÖס£
ʹÓÃ×ÊÔ´ÎļþµÄÓŵãºÜÏÔÖø£¬ÆäȱµãÒ²ºÜÍ»³ö¡£ËùÒÔÔÚʵ¼ÊÓ¦ÓÃÖоÍÒª¸ù¾ÝÇé¿öȨºâÀû±×¡¢Áé»îʹÓã¬ÕâÒѲ»ÔÚ±¾ÎĵÄÌÖÂÛÖ®ÁС£ÏÂÃæ½ö¾ÍDelphiϵͳ±à³ÌÖжÔÓÚ×ÊÔ´ÎļþµÄʹÓ÷½·¨×öÒ»¸ö´óÖµÄ×ܽᡣ
¶þ¡¢´´½¨×ÊÔ´Îļþ£º
×¢ÒâÊÂÏ´´½¨µÄ×ÊÔ´ÎļþÃû²»ÒªºÍ¹¤³ÌÃûÏàͬ£¬ÒòΪDelphi´´½¨¹¤³Ìʱ»á×Ô¶¯´´½¨Ò»¸öºÍ¹¤³ÌÃûÏàͬµÄ×ÊÔ´Îļþ¡£²¢ÇÒ×îºÃ½«×ÊÔ´Îļþ±£´æµ½ºÍ¹¤³ÌÎļþͬһ¸öÎļþ¼ÐÖС£
1£®Ê×ÏÈ´´½¨Ò»¸ö.RcµÄ´¿Îı¾Îļþ¡£¸ñʽÈçÏ£º
×ÊÔ´±êʶ·û ¹Ø¼ü×Ö ×ÊÔ´ÎļþÃû
¸ñʽ˵Ã÷£º
¢Ù ×ÊÔ´±êʶ·û£º³ÌÐòÖе÷ÓÃ×ÊԴʱµÄÌض¨±êºÅ£»
¢Ú ¹Ø¼ü×Ö£º±êʶ×ÊÔ´ÎļþÀàÐÍ£»ÀýÈ磺
Wave £º ×ÊÔ´ÎļþÊÇÉùÒôÎļþ£»
RCDATA£º JPEGÎļþ£»
AVI £º AVI¶¯»£»
ICON £º ͼ±êÎļþ£»
BITMAP£º λͼÎļþ£»
CURSOR£º ¹â±êÎļþ£»
RMI £º RMIÒôÀÖÎļþ£»
MIDI £º MIDIÒôÀÖÎļþ
¢Û ×ÊÔ´ÎļþÃû£º¼ÓÈëµÄ×ÊÔ´ÎļþÃû(Òª´øÀ©Õ¹Ãû£¬¿ÉÒÔ´ø·¾¶Ãû¹¹³ÉÈ«ÎļþÃû)£»
¢Ü ¾ÙÀý£º MyWav WAVE "FileName.Wav"
MyMID MIDI "C:\My Documents\my music\canyon.MID"
MyAVI AVI "SpeedIs.AVI"
ÀýÖÐ×ÊÔ´ÎļþÃû¿ÉÒÔ²»¼ÓÒýºÅ¡£¼ÙÉèÎÒÃÇ°ÑÉÏÊöÈýÐб£´æ³ÉSample.RCÎļþ¡£
2¡£Ê¹ÓÃBorland×ÊÔ´±àÒëÆ÷£¨BRCC32.EXE£©×ª»¯.RcÎļþ³É.ResÎļþ¡£
ÔÚDOSÃüÁîÐÐÏÂÊäÈëÏÂÁÐÃüÁ
C£º //תÔÚC:Çý
CD\ //Í˻ظùĿ¼
CD\Program Files\Borland\Delphi7\Bin //½øÈëBRCC32.EXEµÄËùÔÚĿ¼
Brcc32 Sample.Rc //°ÑSample.RCת»»³É×ÊÔ´ÎļþSample.RES
×¢Òâת»»Ç°ÐèÒª°ÑSa
Ïà¹ØÎĵµ£º
//¶¨ÒåMyClass
TMyClass = class
GUID: string;
Name: string;
bSex: Boolean;
Tel : string;
end;
//È¡Öµ
var
obj: TMyClass;
begin
obj := TMyClass.Create;
with Memo1.Lines do
begin
Add('¶ÔÏó´óС:' + IntToStr(obj.InstanceSize));
Add('¶ÔÏóËùÔÚµØÖ·£º'+ ......
Delphi TIniFile Àà ²Ù×÷iniÅäÖÃÎļþ
2007Äê12ÔÂ08ÈÕ ÐÇÆÚÁù 09:56
Ò»¡¢ÓбØÒªÁ˽âINIÎļþµÄ½á¹¹£º
;×¢ÊÍ
[С½ÚÃû]
¹Ø¼ü×Ö=Öµ
...
---- INIÎļþÔÊÐíÓжà¸öС½Ú£¬Ã¿¸öС½ÚÓÖÔÊÐíÓжà¸ö¹Ø¼ü×Ö£¬ “=”ºóÃæÊǸùؼü×ÖµÄÖµ¡£
---- ÖµµÄÀàÐÍÓÐÈýÖÖ£º×Ö·û´®¡¢ÕûÐÍÊýÖµºÍ²¼¶ûÖµ¡£ÆäÖÐ×Ö·û´®´æÖüÔÚINIÎļþÖÐÊ±Ã»Ó ......
1.±»×°ÊÎÕß
{¡¶HeadFirstÉè¼Æģʽ¡·Ö®×°ÊÎģʽ }
{ ±¾µ¥ÔªÖеÄÀàΪ±»×°ÊÎÕß }
{ ±àÒ빤¾ß: Delphi7.0 }
{ E-Mail : xshlife@163.com }
unit uComponent;
interface
type
TBeverage = class(TObject) //³éÏóÒûÁÏÀà
protected
FDescription: String;
public
......
ÃüÁîģʽ¿ÉÒÔºÜÇáËɵÄʵÏÖ³·Ïú£¨Undo£©¹¦ÄÜ¡£
1. ÃüÁîµÄ½ÓÊÜÕß
unit uReceiveObject;
interface
type
TLight = class(TObject)
public
procedure Open;
procedure Off;
end;
implementation
{ TLight }
procedure TLight.Off;
begin
Writeln('Light is off.');
......