마우스 죄표값 얻기
*
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

이 게시물을

공유하기

SEARCH

MENU NAVIGATION