?
Solved

Detecting cursor leaving control

Posted on 1998-09-22
2
Medium Priority
?
144 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 150 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 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