Results 1 to 3 of 3

Thread: Icon in system tray problem

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    34

    Post

    Hi, I have a program, that when minimised runs in the system tray. Everything appears to work ok, until I quit the program. The icon for the program still sits in the system tray until i move the mouse over it, then it goes.

    how can i get the icon to disappear as soon as the program is terminated.

    thanks in advance
    MICK

  2. #2
    Junior Member
    Join Date
    Jan 2000
    Location
    Edmonton,AB, Canada
    Posts
    30

    Post

    I have the same problem and I implemented the following solution. I have a dummy form that holds the icon that is displayed in the tray and when I unload the form from memory and then execute a DoEvents followed by the End statement explicitly my icon goes away properly. However if I do not use the End statement to terminate the program I have the same problem as you are now experincing.

    ------------------
    David L. Baudais
    Systems Analyst


  3. #3
    Junior Member
    Join Date
    Jan 1999
    Location
    Q.C., Phils.
    Posts
    27

    Post

    If you wrote your own code to display the icon in the systray, then you must explicitly destroy the icon you created by using the parameter 'NIM_DELETE' (&H2) for the Shell_NotifyIcon API. If you're using a control or some dll, then I must say, the author of the program should know better, you can't do much about it since the icon is controled by that app and not you. If you need a Tray control, I have one in my page
    www.geocities.com/eclipseds


    ------------------
    Share your knowledge, it is the best way to achieve immortality

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