get / set cursor position
basically this is a quick function to show you how to set or get the position of your mouse cursor.
AI
AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
소스 코드
Private Function setCursor(ByVal X As Integer, ByVal Y As Integer)<br> If Not X = Nothing And Not Y = Nothing Then<br> Dim curPoint As New Point(0, 0)<br> curPoint.X = X<br> curPoint.Y = Y<br> Cursor.Position = curPoint<br> End If<br> End Function<br><br> Public Function getCursor()<br> Dim curPoint As New Point(0, 0)<br> curPoint.X = Cursor.Position.X<br> curPoint.Y = Cursor.Position.Y<br> Return curPoint<br> End Function<br> 'USAGE:<br> 'to get cursor position:<br> MsgBox(getCursor.x & ", " & getCursor.y)<br> 'to set cursor position:<br> setCursor(x coordinate, y coordinate)<br><br> <b>i hope this snippet has helped anyone out there who is strugling with cursor functions.</b>
원본 댓글 (3)
Wayback Machine에서 복구됨