Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    345

    Grin Refreshing System Tray using User32.dll .... how ?

    ok, this is a fairly common issue i think, so someone probably has a quick and painless solution

    scenario = i'm closing a number of other applications from within my project by terminating their process (vicious i know :P) some of them i am restarting at a later point, so after i have finished messing around my tasktray area looks a complete mess until move the mouse over it ... i'm not happy with this and would like it to be cleaner, easiest way i can think to do this is to refresh the tasktray at the end of my scripting.

    here is some other info relating to this windows xp bug/feature

    Code:
    http://techsupt.********.com/webcgi/webbatch.exe?techsupt/tsleft.web+********/Systray~Icon~Questions+Refresh~System~Tray~Area.txt
    Now i can see that i need to use addl call on the user32.dll, but not too sure about the specifics of what to write

    so looking for a little help, cheers


    EDIT:
    or is it possible to adapt the method described here ...
    Code:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=140994&SiteID=1
    Last edited by qwerty; 06-12-2007 at 10:19 AM. Reason: added other method example

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    I don't know that there's any way to do this programatically.

    You can refresh the tray but that just repaints it and that won't make the
    icon go away. Windows doesn't realize the app is still there until you move
    the mouse over it and Windows can't do a callback.

    although it might be possible to send a mouse click to the system tray and fool windows, worms send keys will do the job im sure.....i have a go and get back to you
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Oct 2006
    Posts
    345
    repainting it might cause it to re-asses the icons, one of the other things i have read about this issue used the repaint method i think .... its a little over my head lol, but i'm always willing to experiment

    speaking of which ... stand by for questions on menu's shortly too as i'm playing with a custom tray menu at the moment, 90% of it works, just need to search how to set things as disabled (such as minimise & restore) depending on the projects current state, it's a shame you cant just add to the original menu instead of replacing it ... also need to learn about ticked items for always on top option ! ... gonna be a busy night

  4. #4
    Join Date
    Oct 2006
    Posts
    345
    well i've been messing around with it, but no luck, i dont fully understand the dll call to re-paint the taskbar, so i cant say if that works or not !!

    dam it would be so easy if someone had made a small app that when run would refresh the taskbar, then i could simply add it to my project docs folder and run it from the script each time i terminate something

Similar Threads

  1. System tray question
    By Magellan in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 09-20-2006, 06:56 AM
  2. Cant restore/show system tray window?
    By SonG0han in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 12-31-2005, 08:07 PM
  3. System Tray to Task Bar
    By jwarrent in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 12-21-2005, 04:00 PM
  4. System Tray? & Task Bar? Ideas?
    By Tux in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 04-06-2004, 12:44 AM

Posting Permissions

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