I need a popup form to appear right above my program's tray icon. Is there a way to find out the position (Left property) for a tray icon created using Tip #61, or any tray icon in general?
------------------
Mike Wellems
PowerQuery
Printable View
I need a popup form to appear right above my program's tray icon. Is there a way to find out the position (Left property) for a tray icon created using Tip #61, or any tray icon in general?
------------------
Mike Wellems
PowerQuery
if you'be only made 1 tray icon, the following shuld work:
Code:Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Place this in the form's mousemove:
Static Message As Long
Static RR As Boolean
Message = X / Screen.TwipsPerPixelX
If RR = False Then
RR = True
Select Case Message
' Right button up (This should bring up a menu)
Case WM_LBUTTONUP
GoTo t
Case WM_RBUTTONUP
t:
PopupMenu MnuName 'replace that code with what you want the icon
' to do
End Select
RR = False
End If
End Sub