|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
simple mouse enter command
Hi, im an engineering student and for a project i need a simple piece of delphi code which i cant actually do
I need to start a timer when the mouse cursor enters an image and stop the timer when the cursor leaves. Thats all i need but i cant do it! (the timer has to stop when the image is clicked) Could anyone write the code for me? Im sure it wont even take that long! Any help appreciated Cheers |
|
#2
|
|||
|
|||
|
Hey I'm at work so I do not know if this will help and am unable to write the code as I don't have Delphi here...BUT...
You could possibly do it using mouseover function of the picture to start the timer..I'm not sure if there is a !mouseover function. But if there isn't you could have a check in the timer code checking the position of the mouse pointer to see if it is within the picture boundaries. And under the picture click proc you can stop the timer.. It's probably not teh best way but i can't check it myself at the moment sorry. Hope this helps at least a lil. |
|
#3
|
|||
|
|||
|
You can detect MouseMove message and capture it using CaptureMouse. When the cursor leaves the picture, call ReleaseMouse. That way, you can simulate MouseEnter and MouseLeave.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > simple mouse enter command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|