Results 1 to 4 of 4

Thread: How to make a tray-popup?

  1. #1

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

    Post

    One last question. I need to make a small window popup near the system tray when the user moves the mouse over my tray icon, and then disappear when they move the mouse away. Making it popup is easy, but getting it to disappear seems impossible. Also, the window needs to popup right above the taskbar, so is there any way to find out the taskbar height? I have seem this before in some Norton software. As always, whoever solves this problem for me gets a free copy of Workload 2000 ($19.95 value) when it's finished. Workload helps manage your projects and earnings.

    Thanks again for all your help!

    ------------------
    Mike Wellems
    PowerQuery

  2. #2
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314

    Post


    There are some samples out there that will show you how to get the bar height. I had one a while ago but no longer have it.

    If you do a search.... You will find your answer..

  3. #3
    Addicted Member Jakys's Avatar
    Join Date
    Dec 1999
    Location
    Norway
    Posts
    180

    Post

    Do it the common way:
    When you rightclick on the trayicon, the popup appear, and when you click somewere else it disappear.

    If you find the code to make it disappear someday, make an update or something.

    The sysinfo-control might tell you the taskbarheight.

    Jakys

    [This message has been edited by Jakys (edited 12-04-1999).]

    [This message has been edited by Jakys (edited 12-04-1999).]

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Post

    For the heigth of the taskbar try this
    Code:
    Option Explicit
    Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
    End Type
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
    Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
    
    
    Private Sub Command1_Click()
    Dim retVal As Long
    Dim Size As RECT
        retVal = FindWindow("Shell_TrayWnd", vbNullString)
        Call GetClientRect(retVal, Size)
        MsgBox "Heigth of Taskbar : " & Size.Bottom & " Pixels"
        Call GetWindowRect(retVal, Size)
        MsgBox "Position of Taskbar:" & vbCrLf & "Left :" & Size.Left & vbCrLf & "Right : " & _
                Size.Right & vbCrLf & "Top : " & Size.Top & vbCrLf & "Bottom : " & Size.Bottom
    End Sub

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