::: µ¨ÆÄÀÌ Tip&Trick :::

µ¨ÆÄÀÌ Tip&Trick ¼º°Ý¿¡ ¸ÂÁö ¾Ê´Â ±¤°í,ºñ¹æ,Áú¹®ÀÇ ±ÛÀº Áï½Ã »èÁ¦Çϸç
³»¿ëÀ» º¹»çÇÏ¿© »ç¿ëÇÒ °æ¿ì ¹Ýµå½Ã ÀÌ°÷(http://www.howto.pe.kr)À» Ãâó·Î ¸í½ÃÇÏ¿© ÁÖ¼¼¿ä


Category

  ±è¿µ´ë(2003-03-07 20:08:34, Hit : 4185, Vote : 1085
 SpeedButton ¿¡ OnMouseEnter/OnMouseExit À̺¥Æ® ³Ö±â

This technique might not give you all the right results. For instance,
what if, on form creation, the cursor is inside the button? The event
doesn't get triggered immediately. If it's not too much of a pain (i.e.
you've already got a zillion TSpeedButtons created), you might consider
writing your own TSpeedButton descendent that traps the MOUSEENTER and
MOUSELEAVE message. Here's an example:


unit PsSpeedButton;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons;

type
  TPsSpeedButton = class(TSpeedButton)
  private
  protected
    FOnMouseEnter: TNotifyEvent;
    FOnMouseLeave: TNotifyEvent;
    procedure DoMouseEnter; virtual;
    procedure DoMouseLeave; virtual;
    procedure CMMouseEnter(var Msg: TMessage); message CM_MOUSEENTER;
    procedure CMMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE;
  public
  published
    property OnMouseEnter: TNotifyEvent read FOnMouseEnter
                                        write FOnMouseEnter;
    property OnMouseLeave: TNotifyEvent read FOnMouseLeave
                                        write FOnMouseLeave;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Professional Software', [TPsSpeedButton]);
end;

procedure TPsSpeedButton.DoMouseEnter;
begin
  if Assigned(OnMouseEnter) then OnMouseEnter(Self);
end;

procedure TPsSpeedButton.DoMouseLeave;
begin
  if Assigned(OnMouseLeave) then OnMouseLeave(Self);
end;

procedure TPsSpeedButton.CMMouseEnter(var Msg: TMessage);
begin
  DoMouseEnter;
end;

procedure TPsSpeedButton.CMMouseLeave(var Msg: TMessage);
begin
  DoMouseLeave;
end;

end.





491   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] TRichEdit ÀÇ ¼±ÅÃµÈ ¿µ¿ª¸¸ ÀμâÇÏ±â  ±è¿µ´ë 2003/03/07 4861 839
490   [½Ã½ºÅÛ] CPU Á¾·ù ±¸ÇÏ±â  ±è¿µ´ë 2003/03/07 5175 1282
489   [½Ã½ºÅÛ] »ç¿îµåÆÄÀÏ ¾øÀÌ PC ½ºÇÇÄ¿·Î À½¾Ç¿¬ÁÖ  ±è¿µ´ë 2003/03/07 7374 972
488   [³×Æ®¿÷/ÀÎÅͳÝ] ÇÁ·Î±×·¥À¸·Î ³×Æ®¿öÅ© µå¶óÀÌºê ¿¬°á/ÇØÁ¦  ±è¿µ´ë 2003/03/07 7247 1337
487   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] À©µµ¿ìÁî Á¾·á¿Í °°Àº ±×´ÃÁø È­¸é ¸¸µé±â  ±è¿µ´ë 2003/03/07 3400 882
486   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ¾ÆÀÌÄÜ »çÀÌÆ®  ±è¿µ´ë 2003/03/07 3898 1128
485   [½Ã½ºÅÛ] À©µµ¿ìÁî ½Ã½ºÅÛ Ç¥ÁØ ÆùÆ® ±¸ÇÏ±â  ±è¿µ´ë 2003/03/07 3324 889
484   [³×Æ®¿÷/ÀÎÅͳÝ] RS232 Åë½Å  ±è¿µ´ë 2003/03/07 7387 1912
483   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ÁÖ¾îÁø ¿µ¿ªÀÇ È­¸é ĸó  ±è¿µ´ë 2003/03/07 3777 1041
482   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ¼ýÀÚ¸¦ ¿µ¹® Ç¥±â·Î ¹Ù²Ù±â  ±è¿µ´ë 2003/03/07 4511 948
481   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ¼ýÀÚ¸¦ ÇÑ±Û Ç¥±â·Î ¹Ù²Ù±â  ±è¿µ´ë 2003/03/07 3876 974
480   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] RichEdit ÀÇ ³»¿ëÀ» Bitmap À¸·Î ¸¸µé±â 2  ±è¿µ´ë 2003/03/07 4145 1490
479   [COM/OLE] MS-WORD Á¾·á½ÃÅ°±â  ±è¿µ´ë 2003/03/07 2901 793
478   [À©µµ¿ìÁî API] ½Ã½ºÅÛ »ç¿îµå ¿¬ÁÖÇÏ±â  ±è¿µ´ë 2003/03/07 5159 1363
477   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] Algorithm to sort a TStringGrid #2  ±è¿µ´ë 2003/03/07 5081 1278
476   [À©µµ¿ìÁî API] ¿ÜºÎ ÇÁ·Î±×·¥ÀÇ ÁÂÇ¥,»óÅ ±¸ÇÏ±â  ±è¿µ´ë 2003/03/07 3485 1070
475   [À©µµ¿ìÁî API] À©µµ¿ìÁî Telnet À¸·Î È£½ºÆ® Á¢¼ÓÇÏ±â  ±è¿µ´ë 2003/03/07 4375 1156
474   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ƯÁ¤ÇÑ Æú´õ·Î À̵¿ÇÑ DOS â ¶ç¿ì±â  ±è¿µ´ë 2003/03/07 4477 1174
473   [½Ã½ºÅÛ] DOS ¸í·É¾î ½ÇÇàÇÏ°í °á°ú ¹Þ¾Æ¿À±â  ±è¿µ´ë 2003/03/07 6948 1592
472   [À©µµ¿ìÁî API] NTÀÇ ÇöÀç user°¡ administrative privilege ¸¦ °¡Áö°í ÀÖ´ÂÁö?  ±è¿µ´ë 2003/03/07 3376 893
471   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] µÎ°³ÀÇ StringGrid sync ¸¶Ãß±â  ±è¿µ´ë 2003/03/07 3946 1048
470   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] À©µµ¿ìÀÇ title bar ÆùÆ® ¹Ù²Ù±â  ±è¿µ´ë 2003/03/07 3515 891
469   [³×Æ®¿÷/ÀÎÅͳÝ] ³×Æ®¿öÅ© °øÀ¯ ¼³Á¤/ÇØÁ¦ Çϱâ (Windows 9x)  ±è¿µ´ë 2003/03/07 4695 1133
468   [³×Æ®¿÷/ÀÎÅͳÝ] ³×Æ®¿öÅ© °øÀ¯ Á¤º¸ Àоî¿À±â (WIndows 9x)  ±è¿µ´ë 2003/03/07 3958 1070
467   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ´­·ÁÁø Å°º¸µå Å°ÀÇ ¸íĪ ±¸ÇÏ±â  ±è¿µ´ë 2003/03/07 7667 1489
466   [À©µµ¿ìÁî API] Windows98 ¿¡¼­ÀÇ SetForegroundWindow  ±è¿µ´ë 2003/03/07 6187 1572
465   [À©µµ¿ìÁî API] Task bar ¿¡ ³ªÅ¸³ªÁö ¾Ê´Â ÇÁ·Î±×·¥ ¸¸µé±â  ±è¿µ´ë 2003/03/07 5496 1575
464   [COM/OLE] Outlook »ç¿ëÇÏ±â  ±è¿µ´ë 2003/03/07 3770 1165
463   [½Ã½ºÅÛ] ÁöÁ¤ÇÑ drive°¡ CD-ROM ÀÎÁö °Ë»çÇÏ±â  ±è¿µ´ë 2003/03/07 6676 1717
462   [½Ã½ºÅÛ] ¾î¶² ¾îÇø®ÄÉÀ̼ÇÀÌ ½ÃÀÛ µÇ´ÂÁö hookÀ¸·Î ¾Ë¾Æ³»±â  ±è¿µ´ë 2003/03/07 5577 1643
461   [À©µµ¿ìÁî API] À©µµ¿ìÁî Ž»ö±âÀÇ ¾ÆÀÌÄÜ »Ì¾Æ³»¼­ »ç¿ëÇÏ±â  ±è¿µ´ë 2003/03/07 8411 1969
460   [À©µµ¿ìÁî API] System Images  ±è¿µ´ë 2003/03/07 8325 1901
459   [À©µµ¿ìÁî API] ÄÄÇ»ÅÍ/ÆÄÀÏ/Æú´õ ã±â È­¸é ¶ç¿ì±â  ±è¿µ´ë 2003/03/07 8301 1559
458   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] Unix-format time À» TDateTime ·Î ¹Ù²Ù±â  ±è¿µ´ë 2003/03/07 4325 1158
457   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] ½ÇÇà½Ã component ¸¦ Move/Resize ½ÃÅ°±â  ±è¿µ´ë 2003/03/07 3550 999
456   [ÀϹÝ/ÄÄÆ÷³ÍÆ®] TMemo ¸¦ È­¸éÅ©±â·Î ÀμâÇÏ±â  ±è¿µ´ë 2003/03/07 3057 740
  [ÀϹÝ/ÄÄÆ÷³ÍÆ®] SpeedButton ¿¡ OnMouseEnter/OnMouseExit À̺¥Æ® ³Ö±â  ±è¿µ´ë 2003/03/07 4185 1085
454   [À©µµ¿ìÁî API] Å°º¸µåÀÇ Scroll Lock Äѱâ/²ô±â  ±è¿µ´ë 2003/03/07 4575 1201
453   [µ¥ÀÌÅͺ£À̽º] table packing ÇÏ±â  ±è¿µ´ë 2003/03/07 3857 1040
452   [À©µµ¿ìÁî API] reboot Windows  ±è¿µ´ë 2003/03/07 4257 1212

[ÀÌÀü 10°³] [1]..[11][12] 13 [14][15][16][17][18][19][20]..[25] [´ÙÀ½ 10°³]
 

Copyright 1999-2024 Zeroboard / skin by zero