> 其他 >
好心人帮我弄弄这个,看看这个程序哪里错了,怎么改吧~~~谢谢呀
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Type POINTAPI
x As Long
y As Long
人气:411 ℃ 时间:2020-03-26 23:35:29
解答
在最后加一个end Type,如下
Private Type POINTAPI
x As Long
y As Long
End Type
调用坐标的方法如下:
Dim P1 As POINTAPI
GetCursorPos P1
Label1.Caption = CStr(P1.x) & "," & CStr(P1.y)
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版