Version 7 of system tray

Updated 2002-10-30 21:22:13

Microsoft Windows-specific (but KDE has one, too?) GUI construct in the lower right-hand corner, not the taskbar, that ... (RS adds:) holds little icons with mouse-over balloon behavior, and on double-click bring up minimized windows. Typically there are at least speaker volume control and clock; the Task manager also makes a tray icon that indicates CPU usage.

winico or Win32api are necessary to manage the system tray.


Tom Wilkason posted to the comp.lang.tcl newsgroup: "Here is an example from an http server that hides itself in the taskbar ...

    ;##
    ;# Callback to handle taskbar icon events
    ;#
    proc ht:iconCallback { message ico wparam lparam x y } {
       switch -- $message {
          WM_LBUTTONDOWN {
             wm deiconify .
          }
          WM_RBUTTONDOWN {
             wm withdraw .
          }
          default {}
       } ;# End Switch
    }
    ;##
    ;# Make window dissapear when it is minimized
    ;#
    if {[catch {
       package require WinIcoUtils
       if {[winico info] == ""} {  
          ;# Let GUI settle before setting icon
          update
          set ico [winico_seticon . [file join $home .. bin tclhttp.ico]]
          winico text $ico {tchHttp Web Server}
          winico taskbar add $ico -callback [list ht:iconCallback %m %i %w %l %x
    %y]
          proc Minimize {w} {
             wm withdraw .
             console hide
          }
       } ;# end if
    } result]} {
       console show
       puts stderr "$result"
    } else {
       wm withdraw .
    }