README.md
December 5, 2022 ยท View on GitHub
Description
basically this is a quick function to show you how to set or get the position of your mouse cursor.
More Info
| Submitted On | |
| By | James Finniss |
| Level | Beginner |
| User Rating | 4.0 (20 globes from 5 users) |
| Compatibility | VB.NET |
| Category | Miscellaneous |
| World | .Net (C#, VB.net) |
| Archive File |
Source Code
Private Function setCursor(ByVal X As Integer, ByVal Y As Integer)
If Not X = Nothing And Not Y = Nothing Then
Dim curPoint As New Point(0, 0)
curPoint.X = X
curPoint.Y = Y
Cursor.Position = curPoint
End If
End Function
Public Function getCursor()
Dim curPoint As New Point(0, 0)
curPoint.X = Cursor.Position.X
curPoint.Y = Cursor.Position.Y
Return curPoint
End Function
'USAGE:
'to get cursor position:
MsgBox(getCursor.x & ", " & getCursor.y)
'to set cursor position:
setCursor(x coordinate, y coordinate)
i hope this snippet has helped anyone out there who is strugling with cursor functions.