Click to See Complete Forum and Search --> : Find out tray icon position
mwdelta
Dec 5th, 1999, 11:45 AM
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 (http://www.vb-world.net/tips/tip61.html), or any tray icon in general?
------------------
Mike Wellems
PowerQuery
Rh0ads
Mar 2nd, 2001, 04:16 PM
if you'be only made 1 tray icon, the following shuld work:
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.