Solved

Detecting cursor leaving control

Posted on 1998-09-22
2
135 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

10 Experts available now in Live!

Get 1:1 Help Now