Prova a leggere questo articolo e vedere se è l'esempio che cerchi:

http://www.vbitalia.it/static/tray.htm

oppure vedi se puoi adattare questo piccolo esempio che determina dov'è il puntatore del mouse:

codice:
Type POINTAPI 
 x As Long 
 y As Long 
End Type 

Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long 


Dim z As POINTAPI 


Private Sub Timer1_Timer() 
  GetCursorPos z 
  Label1  "x: " & z.x 
  Label2  "y: " & z.y 
End Sub