Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Activate / Deactivate mouse move event

Hi everybody. I have a questions that is killing me

1) I have a commandbutton painted with color A.

2) I would like that when I move the mouse over it the button get
painted with color B. (This is easily done with "mousemove").

3)But when I move the mouse outside the button I would like to get it
painted with original color A.

The problem with mousemove is that it triggers an event when I move
over the button but it doesn´t come back to original situation when I
leave movng over the button.

Does this have a solution?

Thank you all
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Activate / Deactivate mouse move event

Hi Rolo,

1) I have a commandbutton painted with color A.

2) I would like that when I move the mouse over it the button get
painted with color B. (This is easily done with "mousemove").

3)But when I move the mouse outside the button I would like to get it
painted with original color A.

The problem with mousemove is that it triggers an event when I move
over the button but it doesn´t come back to original situation when I
leave movng over the button.


If the button is on a worksheet, you could paint a rectangle behind the
button and use the rectangle's mousemove event to change the color of
the button. Otherwise, if it is on a userform, use the mousemove event
of the form itself.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Activate / Deactivate mouse move event

Rolo,

I have a similar thing with control tooltips that I do. What I do is when I
do the mousemove and it is over the control, I fire Ontime() method to run a
macro after a set time which removes the tooltip. I would have thought it is
feasible within that macro to check whether the mouse is still over the
control, and if so, don't re-paint, but just fir another OnTime().

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rolo" wrote in message
om...
Hi everybody. I have a questions that is killing me

1) I have a commandbutton painted with color A.

2) I would like that when I move the mouse over it the button get
painted with color B. (This is easily done with "mousemove").

3)But when I move the mouse outside the button I would like to get it
painted with original color A.

The problem with mousemove is that it triggers an event when I move
over the button but it doesn´t come back to original situation when I
leave movng over the button.

Does this have a solution?

Thank you all



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
activate/deactivate macro depending on who's the user anna Excel Discussion (Misc queries) 3 January 24th 10 11:11 PM
Links is in gray color (deactivate). How can I activate? Rechie Excel Discussion (Misc queries) 6 December 13th 09 11:10 AM
Changing sheets after the DeActivate Event. Richard Excel Discussion (Misc queries) 2 July 10th 08 03:49 PM
Workbook Deactivate Event TerryF[_2_] Excel Programming 1 January 6th 04 01:16 AM
Can´t Convert Formulas to Values with Deactivate event Rolo[_3_] Excel Programming 2 November 8th 03 09:13 PM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"