Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is there a way to have the mouse pointer move from the form command button
you just clicked to some location on the screen (some X,Y coordinate) . just so it is away from the form area itself is what is needed . . . any help appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A little search of google came up with a couple of API's that worked ok for me:
In a general module: Option Explicit Public Type POINTAPI x As Long y As Long End Type Declare Function SetCursorPos Lib "User32" _ (ByVal x As Long, ByVal y As Long) As Long Declare Function GetCursorPos Lib "User32" _ (lpPoint As POINTAPI) As Long Behind the form: Option Explicit Private Sub CommandButton1_Click() Dim myPointAPI As POINTAPI GetCursorPos myPointAPI Call SetCursorPos(myPointAPI.x - 300, myPointAPI.y) End Sub (I used 300 with my button, but you could experiment and use whatever you needed.) lightbulb_bill wrote: is there a way to have the mouse pointer move from the form command button you just clicked to some location on the screen (some X,Y coordinate) . just so it is away from the form area itself is what is needed . . . any help appreciated. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
mouse pointer | Excel Discussion (Misc queries) | |||
mouse pointer | Excel Discussion (Misc queries) | |||
moving mouse pointer | Excel Programming | |||
Mouse pointer | Excel Programming | |||
mouse pointer | Excel Programming |