This may be a low grade solution but the GetCursorPos API will return your mouse X-Y coordinates anywhere on your screen. You can then use an If -Then block similar to this example to select your image.
Code:Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Dim z As POINTAPI ' Declare variable Private Type POINTAPI ' Declare Types X As Long Y As Long End Type Private Sub Form_Load() Timer1.Interval = 100 End Sub Private Sub Timer1_Timer() GetCursorPos z ' Get coordinates Label1 = "X: " & z.X ' Get X coordinates Label2 = "Y: " & z.Y ' Get Y coordinates If z.X > 383 Then Beep ' Beep if X is greater than 383 If z.Y > 243 Then Beep ' Beep if Y is greater than 243 End Sub





Reply With Quote