Thema
Auslesen der aktuellen Mausposition
Gruppe
Maus
Problem
Die aktuelle Mausposition soll ausgelesen werden.
StandardModule: basMain Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type Sub WhereAmI() Dim pTargetPoint As POINTAPI Dim lRetVal As Long lRetVal = GetCursorPos(pTargetPoint) MsgBox "Meine Position:" & vbLf & _ pTargetPoint.x & "," & pTargetPoint.y End Sub