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

delphi Èý·½¿Ø¼þ

VCLÖеÄShapeÊǸöºÜ²»´íµÄ¿Ø¼þ£¬¿ÉÒÔÑ¡Ôñ¼¸ÖÖͼÐΣ¬ÒÔÂú×ãÎÒÃǵÄÐèÇ󣬵«ÓÐʱºò¾ÍÊǾõµÃËüµÄ¿ÉѡͼÐÎÉÙÁËÒ»µã£¬±ÈÈçÎÒÃÇÏëÒªÒ»¸öÈý½ÇÐΣ¬ËüȴûÓС£ÓÚÊǾÍÏëµ½À´À©Õ¹Ò»ÏÂÕâ¸ö¿Ø¼þ£¬ÃûΪShapeEx¡£ÆäʵÀ©Õ¹µÄ¹¦Äܲ»¶à£¬Ö»ÊÇÔö¼ÓÁËһЩͼÐΡ£¶øÀàÒ²²¢²»ÊǼ̳Ð×ÔTShape£¬¶øÊǼ̳Ð×ÔTGraphicControl£¬ÕâÑù¿ÉÒÔÈÃÎÒÃdz¹µ×¿´¿´Í¼ÐοؼþµÄ×ö·¨¡£TshapeÒ²ÊǼ̳Ð×ÔTGraphicControl¡£¶øÎÒÃǵÄÀ©Õ¹¿Ø¼þ¹¦ÄÜÊÇ»ùÓÚShapeµÄÀ©Õ¹£¬ËùÒÔµ±È»ÀïÃæµÄ´úÂ뼸ºõÈ¡Ö®TShape£¬Ö»ÊǼÓÁËһЩÀ©Õ¹Í¼ÐεĴúÂ룬µ«ÓÖÓÐʲô¹ØϵÄØ£¬VCLÔ´ÂëÊÇ×îºÃµÄѧϰ×ÊÔ´£¬ÎÒÃǺβ»È¡Ö®ÓÃÖ®¡£
 
ºÜ¶à¶«Î÷ÎÒÃÇÒѾ­ÔÚÉÏÃæ˵¹ýÁË£¬ÕâÀï²»¶à˵ÁË£¬ÎÒÒªÖ±ÈëͼÐοؼþµÄÖص㡣ͼÐοؼþ²»ÊÇ·â×°WindowsµÄ¿Ø¼þ£¬¶øÊÇDelphi×Ô¼º»­³öÀ´µÄ£¬ÄÇôËü¿Ï¶¨ÓÐÒ»¸ö»­¿Ø¼þµÄº¯Êý¡£Õâ¸öº¯Êý¾ÍÊÇ:
Paint;
 ¿´Ò»ÏÂVCLÔ´Â룬¿ÉÒÔÖªµÀËü¶¨ÒåÔÚTGraphicControl¡£ÖУº
 procedure Paint; virtual;
ÕâÊÇÒ»¸öÐ麯Êý£¬ÄÇôËüµÄʵÏÖÊÇÔõôÑùµÄÄØ£¬µã»÷¿´ËüµÄʵÏÖÈçÏ£º
procedure TGraphicControl.Paint;
begin
end;
ÀïÃæʲôÂëҲûÓУ¬Õâ¸öºÜÈÝÒ×Àí½â£¬ÒòΪËü²»¿ÉÄÜÖªµÀËûµÄ×ÓÀàµÄͼÐÎÊÇʲôÑù×ӵġ£ËùÒÔÉèΪÐ麯Êý£¬ÓÉËüµÄ×ÓÀàÀ´¸²¸ÇËü¡£
 
ÄÇôÊÇË­µ÷ÓÃÁËÕâ¸öº¯ÊýÀ´ÒýÆ𻭿ؼþÄØ¡£WindowsÓÐÒ»¸öWM_PAINT;ÏûÏ¢£¬µ±Ò»ÇÐÒýÆðÖØ»­µÄÌõ¼þ·¢Éú£¬Ôò»á·¢ËÍÕâÌõÏûÏ¢£¬ÔÙ¿´¿´TGraphicControl£¬¹ûÈ»ÓнػñÕâ¸öÏûÏ¢£º
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
ÔÚ´¦Àíº¯ÊýÀïÃ棬µ÷ÓÃÁËPaint·½·¨£¬´Ó¶øʵÏÖÁË»­Í¼Ðοؼþ¿ÉÄÜ£º
procedure TGraphicControl.WMPaint(var Message: TWMPaint);
begin
  if Message.DC <> 0 then
  begin
    Canvas.Lock;
    try
      Canvas.Handle := Message.DC;
      try
        Paint;   //µ÷ÓÃÁËÕâ¸öº¯ÊýÀ´»­Í¼Ðοؼþ
      finally
        Canvas.Handle := 0;
      end;
    finally
      Canvas.Unlock;
    end;
  end;
end;
¶øËüµÄ×ÓÀา¸ÇÁËPaintº¯Êý£¬ËùÒÔÏûÏ¢´¦Àíº¯Êýµ÷ÓõÄʵ¼ÊÉÏÊÇij¸ö×ÓÀàµÄPaint·½·¨£


Ïà¹ØÎĵµ£º

Delphi±àдϵͳ·þÎñ¶þ£ºÏµÍ³·þÎñºÍ×ÀÃæ³ÌÐòµÄÇø±ð

 Delphi±àдϵͳ·þÎñ¶þ£ºÏµÍ³·þÎñºÍ×ÀÃæ³ÌÐòµÄÇø±ð ÊÕ²Ø
 Windows 2000/XP/2003µÈÖ§³ÖÒ»ÖÖ½Ð×ö“ϵͳ·þÎñ³ÌÐò”µÄ½ø³Ì£¬ÏµÍ³·þÎñºÍ×ÀÃæ³ÌÐòµÄÇø±ðÊÇ£º
ϵͳ·þÎñ²»Óõǽϵͳ¼´¿ÉÔËÐУ»
ϵͳ·þÎñÊÇÔËÐÐÔÚSystem Idle Process/System/smss/winlogon/servicesϵģ¬¶ø×ÀÃæ³ÌÐòÊÇÔËÐÐÔÚExplorerϵģ» ......

Delphi±àдϵͳ·þÎñÒ»£ºÈçºÎ±àдһ¸öϵͳ·þÎñ

Delphi±àдϵͳ·þÎñÒ»£ºÈçºÎ±àдһ¸öϵͳ·þÎñ ÊÕ²Ø
 ´ò¿ªDelphi±à¼­Æ÷£¬Ñ¡Ôñ²Ëµ¥ÖеÄFile|New|Other...£¬ÔÚNew ItemÖÐÑ¡ÔñService ApplicationÏDelphi±ã×Ô¶¯ÎªÄ㽨Á¢Ò»¸ö»ùÓÚTServiceApplicationµÄй¤³Ì£¬TserviceApplicationÊÇÒ»¸ö·â×°NT·þÎñ³ÌÐòµÄÀ࣬Ëü°üº¬Ò»¸öTService1¶ÔÏóÒÔ¼°·þÎñ³ÌÐòµÄװж¡¢×¢²á¡¢È¡Ïû· ......

[delphi×é¼þ] WebbrowserµÄʹÓÃ

delphiÖÐWebbrowserµÄʹÓÃ
1.»ñµÃÍøÒ³ÖбäÁ¿Öµ
     htmÖÐ<script> var currID=123</script>
     ³ÌÐòÖпÉÒÔÕâôµ÷Óà id := Form1.WebBrowser1.OleObject.Document.script.currID
     ÖµµÃ˵Ã÷µÄÊÇ,±äÁ¿¿ÉÒÔÊÇjavascript¶¨ÒåµÄ,Ò²¿ÉÒÔÊÇvbs ......

ÔõôÓÃdelphiÏòÍøÒ³Ìá½»µÇ½ÐÅÏ¢

procedure TForm1.Button2Click(Sender: TObject);
var  
o : Olevariant;
begin  
  webbrowser1.Navigate('http://www.163.com');  
  delay(2000);
  o :=   WebBrowser1.OleObject.document.all.item('username',0);
  o.value := 'username';  
  o := W ......

delphi_·Ö¸ô×Ö·û´®_¶à¼ä¸ô×Ö·û

procedure mc_SplitStr(sourStr:String;splitChar:String;desLst:TStringList);
var
  tmpStr:String;
  sValue:String;
  iStart,iPos:Integer;
begin
  try
    desLst.Clear;             //ºÜÖØÒª£¬·ñÔò£¬»áÒ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ