Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

DelphiʼþµÄ¹ã²¥


    Ã÷Ìì¾ÍÊÇÎåÒ»½ÚÁË£¬ÐÁ¿àÁ˺ü¸¸öÔ£¬½è´Ë»ú»áÓ¦¸Ã¾¡Çé·ÅËÉÒ»·¬¡£¿ÉÊÇÏëµ½BlogºÃ¾ÃûÓÐдÎÄÕ£¬ËƺõȱЩʲôËƵġ£Õ⼸¸öÔÂÀ´ÔÚÏîÄ¿ÖÐÓÖÔö³¤ÁËÐí¶à¾­Ñ飬ѧµ½Ðí¶àʵ¼ÊÓ¦ÓõÄ֪ʶ¡£²»Èç°ÑһЩ±È½ÏÓÐÓõļǼÏÂÀ´£¬¹©ÅóÓÑÃDzο¼¿ÉºÃ¡£
ÎÒÏëµ½DelphiµÄʼþ£¬ÄÇ¿ÉÕæÊǸö·½±ãµÄ¶«Î÷£¬³õѧÕßÔÚ´°ÌåÉÏÀ­¼¸¸ö¿Ø¼þ£¬²¢Ö¸¶¨ËüÃǵÄʼþ£¬Ð´¼¸¾ä´úÂ룬Á¢¿Ì¾ÍµÃµ½ËûÃÇÏëÒªµÄЧ¹û¡£¿ÉÊÇʼþÔÚ·½±ãµÄͬʱҲÓÐÒ»¸ö²»×ãÖ®´¦£¬¾ÍÊÇÖ»ÄÜÖ¸¶¨Ò»¸ö½ÓÊÕʼþµÄ¶ÔÏó£¬ÕâÔÚijЩӦÓÃÖлáÊÜÊÕÏÞÖÆ£¬±ÈÈç¶àÊÓͼ¶ÔÓ¦Ò»¸öÒµÎñÂß¼­Ê±£¬µ±Ò»¸öÒµÎñ¶ÔÏóÏë֪ͨÊÓͼ¸üÐÂËüÃǵÄ״̬£¬Èç¹ûÓÃʼþ£¬ÄÇÖ»ÄÜÓÐÒ»¸öÊÓͼµÃµ½Í¨Öª¡£
ÓÐûÓа취ÈöÔÏó´¥·¢Ê¼þʱ£¬¶à¸ö¶ÔÏóͬʱÄÜÊÕµ½ÄØ£¿Æäʵ×ÐϸһÏ룬»¹ÊÇÓÐͦ¶àµÄ£¬¸ù±¾µÄ¾ÍÊÇά»¤Ò»ÕŽÓÊÕʼþ¶ÔÏóµÄÁÐ±í£¬Ê¼þ·¢Éúʱ£¬±éÀúÁÐ±í²¢µ÷ÓÃÏàÓ¦µÄ·½·¨¡£±¾ÎĽéÉÜÁ½ÖÖ·½·¨£¬ÕâÁ½ÖÖ·½·¨¶¼±È½ÏºÃÓá£
µÚÒ»ÖÖ·½·¨ÊÇ´ÓApplicationEvents¿Ø¼þµÄʵÏÖ·½Ê½Ñ§À´µÄ¡£ApplicationEventsÊÇΪÁË·½±ãµØ´¦ÀíApplicationµÄËùÓÐʼþ£¬Ò»¸ö³ÌÐòÖзŶà¸öApplicationEvents£¬ËüÃǶ¼ÄÜͬʱ´«µÝApplicationµÄʼþµ½Ê¼þ½ÓÊÕÀàÖУ¬ÏÂÃæÊÇÒ»¸öÀý×Ó£¬ÔÚÒ»¸ö´°ÌåÉÏ·ÅÁ½¸öApplicationEvents¿Ø¼þ£¬²¢Ö¸¶¨ËüÃǵÄOnMessageʼþ£¬²¢Ð´ÈçÏ´úÂ룺
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
  var Handled: Boolean);
begin
  Edit1.Text := IntToStr(i1);
  Inc(i1);
end;
procedure TForm1.ApplicationEvents2Message(var Msg: tagMSG;
  var Handled: Boolean);
begin
  Edit2.Text := IntToStr(i2);
  Inc(i2);
end;
    ÔËÐгÌÐò£¬¿ÉÒÔ¿´µ½Á½¸öʼþ´¦Àí·½·¨¶¼·¢ÉúÁË£¬i1ºÍi2·è¿ñµÄÔö³¤¡£Ò²¾ÍÊÇ˵Applicationͨ¹ýApplicationEventsÕâ¸ö¿Ø¼þʹµÃËüµÄʼþ¿ÉÒÔ±»¶à¸ö¶ÔÏóͬʱ½ÓÊÕ£¬ÏÔÈ»ApplicationEvents²»ÊǼòµ¥µØ´«µÝApplicationµÄʼþ£¬Ò»¶¨ÊÇÔËÓÃÁËijЩ¼¼ÇÉ£¬¿´¿´ËüµÄÔ´ÂëÈçºÎ¡£
    ´ò¿ªAppEvntsÕâ¸öµ¥Ôª£¬·¢ÏÖÀïÃæµÄ´úÂë²¢²»¶à£¬ÔÚ³õʼ½ÚÖÐÓÐÕâÑùµÄ´úÂ룺
initialization
  ... ...
  MultiCaster := TMultiCaster.Create(Application);
end.
    MultiCasterÊÇTMultiCasterÀàµÄÒ»¸öÈ«¾Ö¶ÔÏ󣬹¹Ô캯Êý´«½øAppication¶ÔÏ󣬿ÉÒԿ϶¨£¬ÔÚÀïÃæMultiCaster½«½ÓÊÕApplicationµÄËùÓÐʼþ£¬¿´¿´Ô´Âë¾ÍÖªµÀÁË¡£
constructor TMult


Ïà¹ØÎĵµ£º

Delphi bookmarkʹÓÃ

¹ØÓÚÊéÇ©(BookMark)²Ù×÷£»    
  ÊéÇ©²Ù×÷Ö÷ÒªÓÃÓÚÔÚ±íÖпìËٵض¨Î»¼Ç¼ָÕ룬ÔÚÓ¦ÓóÌÐòÖг£³£Òª±£´æ¼Ç¼ָÕëËùÔÚµÄλÖã¬ÔÚ½øÐÐÆäËû´¦ÀíÖ®ºó£¬Ï£ÍûÄÜ¿ìËٵطµ»Øµ½ÏÈÇ°Ö¸ÕëËùÔÚµÄλÖ㬴Ëʱ£¬Ê¹ÓÃÊéÇ©½«ÏÔµÃÌرðÓÐÓá£ÓйØÊéÇ©²Ù×÷£¬DelphiÌṩÁËÈý¸ö·½·¨£¬ËüÃÇÊÇ£º  
  ¡ñ&n ......

Delphi UÅ̲åÈ벦³ö¼ì²â

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 ......

delphi±¨¾¯ÉùÒô Beep¡¢MessageBeep ºÍ Windows.Beep


Îҵİ취£¬Ôö¼ÓÒ»¸ötimer ÉèÖüä¸ô100ms£¬Í¨¹ýtimerµÄʹÄÜ·ñ£¬¿ØÖƱ¨¾¯ÉùÒô¿ª¹Ø
procedure TForm1.Timer1Timer(Sender: TObject);
begin
   Windows.Beep(1200+i_f,10+i_f);
   if i_f<2000 then
   begin
      inc(i_f);
   end
end;
== ......

Delphi ×é¼þ¿ª·¢½Ì³ÌÖ¸ÄÏ£¨5£©ÊµÏÖÀàQQµÄ±à¼­¿ò

¾àÀëÉÏһƪϵÁеÄÎÄÕÂÓÐÒ»¶Îʱ¼äÁË£¬¼ÙÖÕÓÚÊÇ·ÅÍêÁË£¡ÏÖÔÚÔÛ¼ÌÐøÔÚTEditÉÏ×öÎÄÕ£¬Í¬Ê±À´ÊìϤijЩWindowsµÄϵͳÏûÏ¢¡£ÏÖÔÚÎÒ½²µÄÊÇÈçºÎʵÏÖÒ»¸öÀàËÆQQ±à¼­¿òµÄÑùʽ¡£
  
ÔÙ½²½â֮ǰ£¬ÏÈ»ØÀ¡Ç°¼¸ÆªÎÄÕÂÓÐЩÈËÌá³öµÄÎÊÌ⡣ͨ¹ýÇ°¼¸ÆªÎÄÕ£¬ÓкܶàÈ˹Ø×¢£¬Í¬Ê±Ò²ÓÐÈ˸øÁËһЩ½¨Òé¡£ËùÒÔÎÒÕâÀï˵Ã÷һϣ¬ÎÒÕâ¸ö×é¼ ......

delphiʵÏÖ×Ö·û´®ÖÐÊý×ÖµÄÅжϼ°ÏàÓ¦Êý×ÖÀÛ¼Ó

×î½üÃæÊÔÁËÒ»¼ÒÆóÒµ,ÏÂÃæÓÐÒ»µÀ´ÓÀ´Ã»ÓÐÏë¹ýµÄÎÊÌâ,µ±Ê±ÓÐ˼·,²»¹ýд²»³öÀ´.»ØÀ´ºó,µ÷ÊÔÁËÒ»ÏÂ,·¢ÏÖ»¹ÊÇÓÐÄѶȵÄ,дÉÏÀ´¿´´ó¼ÒÊÇ·ñ»¹ÓиüÓÅ»¯µÄд·¨,»¶Ó­ÌÖÂÛ:
ÏÂÃæʵÏÖ½«×Ö·û´®"10ad200d3" ÖеÄÊý×ֺϼÆ,10+200+3=213
var s1:string;
var i:integer;
var n1:integer;
var tem1: string;
var tem2:integer;
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ