Solved

Detecting cursor leaving control

Posted on 1998-09-22
2
136 Views
Last Modified: 2010-08-05
How can I detect when the mousecursor leaves a control?
I do some highligting in an ownerdrawn Outline control, and I need to know when the mouse leaves the control, so I can remove the highlighting. (It's a standard mouseover-effect). Im using Delphi 1.0
0
Comment
Question by:pede
2 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1340527
You need to override the control and create a component that decends from TOutLine and here is the message to be triggered...
private
  procedure CMMouseEnter(var msg:TMessage); message CM_MOUSEENTER;
  procedure CMMouseLeave(var msg: TMessage); message CM_MOUSELEAVE;

{...}
procedure MyComponent.CMMouseEnter(var msg:TMessage);
begin
    inherited;
    {respond to mouse enter}
end;

procedure MyComponent.CMMouseLeave(var msg: TMessage);
begin
    inherited;
    {respond to mouse leave}
end;
0
 
LVL 1

Author Comment

by:pede
ID: 1340528
I havent got time to check it now, but I assume you are right. This is exactly what I was looking for :)

/Pede

PS. Im SOOOOO tired of Borland (Inprise). Why do they hide all the goodies??? This one should have been a published event!


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now