Results 1 to 2 of 2

Thread: Find out tray icon position

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Kansas, USA
    Posts
    58

    Post

    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

  2. #2
    Addicted Member
    Join Date
    Feb 2001
    Location
    Upstate NY
    Posts
    210

    .

    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
    < o >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width