Re: [VB6 ] 座標問題

看板Visual_Basic作者 (D逃)時間19年前 (2006/11/20 15:24), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串3/3 (看更多)
以下是可以抓滑鼠位置的程式.邊框部份請自己找API Option Explicit Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type Private Sub Timer1_Timer() Dim xy As POINTAPI GetCursorPos xy xy.x = xy.x - Me.Left / Screen.TwipsPerPixelX xy.y = xy.y - Me.Top / Screen.TwipsPerPixelY Label1.Caption = CStr(xy.x) & " : " & CStr(xy.y) End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.145.53.109

11/21 09:27, , 1F
謝謝大大...我試看看^^
11/21 09:27, 1F
文章代碼(AID): #15OLX1xY (Visual_Basic)
討論串 (同標題文章)
文章代碼(AID): #15OLX1xY (Visual_Basic)