🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #439

Re: Hot to implement MouseEnter and MouseExit with SpeedButton ??

#439
From: Reid Roman
Date: Fri, 30 Apr 1999 00:00
40 lines
2276 bytes
Eric wrote:
> 
> Hello,
> 
> Would you please to give me a simple example to implement MouseEnter and
> MouseExit on SpeedButton ????


Use the onmousemove event for the form, this gives you the x and y
co-ordinates of the mouse pointer, something like:

procedure Tfrmnew.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
        if (x>=component1.left) and
(x<=component1.left+component1.width)
        and (y>=component1.top) and
(y<=component1.top+component1.height)
        then messagedlg('Over thecontrol',mtinformation,[mbok],0);
end;


HTH

-- 


                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman			          .
. Programmer / Analyst 	                  . 
. TVisualBasic := Class(None)	          .
. May the Source be With You		  .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A 			  .
. E-Mail : rkroman (at) home (dot) com    .
-------------------------------------------
Technical Details
Message-ID: <3729BFD7.D58959E0@home.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <372925B3.9D95827E@sftw.umac.mo>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb0ea,161c96c908e39ff
X-Google-Attributes: gidfb0ea,public
X-Google-Thread: 1043cf,161c96c908e39ff
X-Google-Attributes: gid1043cf,public
X-Google-Thread: 10baee,161c96c908e39ff
X-Google-Attributes: gid10baee,public
X-Google-Thread: fd817,161c96c908e39ff
X-Google-Attributes: gidfd817,public
X-Google-Thread: 10c3d1,161c96c908e39ff
X-Google-Attributes: gid10c3d1,public
From: Reid Roman <rkroman@home.com>
Subject: Re: Hot to implement MouseEnter and MouseExit with SpeedButton ??
Date: 1999/04/30
Message-ID: <3729BFD7.D58959E0@home.com>
X-Deja-AN: 472702595
Content-Transfer-Encoding: 7bit
References: <372925B3.9D95827E@sftw.umac.mo>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@home.net
X-Trace: news.rdc2.occa.home.com 925482917 24.1.179.123 (Fri, 30 Apr 1999 07:35:17 PDT)
Organization: @Home Network
MIME-Version: 1.0
NNTP-Posting-Date: Fri, 30 Apr 1999 07:35:17 PDT
Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-delphi,borland.public.delphi.objectpascal,borland.public.delphi.vcl.components,borland.public.delphi.vcl.components.using