Home All Groups Group Topic Archive Search About

Check if cursor is on the command or not

Author
11 May 2005 3:43 AM
PJ
Is there a way to check if the cursor is on the command button or not? I
know how to check if it's on by using MouseMove method but don't know how to
check if it's off the buton. Thanks.

Author
11 May 2005 5:07 AM
alpine
On Tue, 10 May 2005 20:43:44 -0700, "PJ" <P*@hotmail.com> wrote:

>Is there a way to check if the cursor is on the command button or not? I
>know how to check if it's on by using MouseMove method but don't know how to
>check if it's off the buton. Thanks.

There are lots of different methods that could be used but which one
you use depends on what you are attempting to accomplish.  So, if you
were to explain exactly what it is that you are trying to accomplish,
I'm sure someone will be able to point you in the right direction.

HTH,
Bryan
____________________________________________________________
New Vision Software                   "When the going gets weird,"
Bryan Stafford                      "the weird turn pro."
alpine_don'tsendspam@mvps.org     Hunter S. Thompson - 
Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas
Author
11 May 2005 5:18 AM
J French
On Tue, 10 May 2005 20:43:44 -0700, "PJ" <P*@hotmail.com> wrote:

>Is there a way to check if the cursor is on the command button or not? I
>know how to check if it's on by using MouseMove method but don't know how to
>check if it's off the buton. Thanks.

GetCursorPos  API

A cheap trick would be to use WindowFromPoint and compare the hWnds

AddThis Social Bookmark Button