|
-
November 1st, 1999, 11:27 AM
#1
Mouseout event ?
How can I mimic a mouseout event on a label ?? mouseover is like mousein but what about mouseout ??
-
November 1st, 1999, 05:12 PM
#2
Re: Mouseout event ?
You're going to find it tricky providing a 'mouseleave' event for a label. A 'mouseleave' message can be captured on most controls that have an 'HWND' property by using the SetCapture and ReleaseCapture API calls - however, a Label control is 'Window-less' - that is, it's painted on the container at run-time.
You could check for a mouse-move event on every other control on your form (including the form itself) to make sure that the mouse is no longer inside the label.
Another way would be to create your own label control from a VB UserControl so that you can capture the mouse messages correctly.
VBAccelerator have a great article (and great code) available at http://vbaccelerator.com/codelib/ssubtmr/msleave.htm that covers just about every method of providing a mouse-leave event.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|