Denne kode gør det hvert milisek
(Du skal oprette 2 labels label1 og label2 og en timer - timer1)
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim a As POINTAPI
Dim b As Long
Dim c As Long
Private Sub mousepos()
ret = GetCursorPos(a)
b = a.x
c = a.y
Label1.Caption = b
Label2.Caption = c
End Sub
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
mousepos
End Sub
Indlæg senest redigeret d. 07.06.2006 13:29 af Bruger #5582