LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add comment to command button

One question, is the Label1 area is to hide the comment? As when I do the
test, I put Label1 away from the command button and as I move away from
the
command button and close to the Label1, then the comment hidden again.


No, that is not what Label1 is for. No event is triggered when the mouse
leaves a control, so I need to come up with a way to know when the mouse was
no longer over the CommandButton so I could hide the comment label. The
MouseMove property of a control triggers while the mouse is moving on that
control, so I added (the invisible) Label1 in order to use its MouseMove
event to detect when the mouse was no longer over the CommandButton (the
mouse will only be over one or the other control, but not both at the same
time) so I could decide when to hide the comment (Label2). The reason I said
to make Label1 large is because, if it is too small, it is possible for the
user to move the mouse fast enough that the initial MouseMove event for
Label1 would not register until after the mouse moved off of it... if that
happens, the comment would not be hidden. The larger Label1 is, the less
chance a user will be able to move the mouse faster than the MouseMove event
can react to it.

Thanks so much. I really learn something and also the tricks on
programming.


My pleasure.

Rick

 
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
Wanting to Create A Command Button Command bumper338 Excel Programming 3 May 7th 07 06:53 PM
VB's Command Button vs Form's Command Button Ronald Dodge Excel Programming 3 May 24th 06 02:23 PM
Comment for ComboBox & Command Button shashidharga[_5_] Excel Programming 1 October 4th 04 07:02 PM
Insert comment command Russell Stevenson Excel Programming 0 November 10th 03 07:32 PM
Insert comment command Russell Stevenson Excel Programming 3 November 9th 03 08:45 PM


All times are GMT +1. The time now is 08:47 AM.

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"