VB.NET
* Public Structure POINTAPI
Dim x As Integer
Dim y As Integer
End Structure
Public Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As POINTAPI) As Integer


Dim p As POINTAPI
GetCursorPos(p)
TextBox1.Text = "X값 : " & p.x & " / Y값 : " & p.y 

* 선언

Public Structure POINTAPI

        Dim x As Integer

        Dim y As Integer

    End Structure


Public Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As POINTAPI) As Integer


*사용

Dim p As POINTAPI

        GetCursorPos(p)

        TextBox1.Text = "X값 : " & p.x & "  / Y값 : " & p.y