Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing Bitmaps with a Mouse Cursor - Problem!!

2 views
Skip to first unread message

Mike Squires

unread,
Mar 18, 1997, 3:00:00 AM3/18/97
to

Hello

I have a query concerning Delphi 2 and bitmaps.
I wanted a bitmap to change when the mouse pointer is placed on top of the
bitmap. So I have loaded in a bitmap into a TImage and created a
OnMouseMove event to load in another bitmap. Unfortunately it doesn't
change back once the mouse pointer is moved from the bitmap.
I was thinking of adding a Timer component to change it back with a delay
of a few seconds or milliseconds, or having a simple loop which will change
the image back when the counter gets to 5 or whatever number.
The problem with the Timer solution is I don't know how to get it to work
with many bitmaps on the same screen which can all change on screen at any
time. So my screen will contain 4 bitmaps which I would like to change when
the mouse pointer is moved over any of them.

Does anyone have any suggestions????


Thanks


Mike.


Ray Lischner

unread,
Mar 19, 1997, 3:00:00 AM3/19/97
to

On 18 Mar 1997 19:22:51 GMT, "Mike Squires" <MSqu...@netcomuk.co.uk>
wrote:

>I have a query concerning Delphi 2 and bitmaps.
>I wanted a bitmap to change when the mouse pointer is placed on top of the
>bitmap. So I have loaded in a bitmap into a TImage and created a
>OnMouseMove event to load in another bitmap. Unfortunately it doesn't
>change back once the mouse pointer is moved from the bitmap.

You can handle the Cm_MouseLeave message.

--
Ray Lischner, Tempest Software, Inc., Corvallis, Oregon, USA
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

0 new messages