I just finished gappling with the change-of-systray-icon problem, and here is a short version of what i did :
use Win32::GUI; use strict; my $okIcon = new Win32::GUI::Icon('C:\Monolith.ico'); my $badIcon = new Win32::GUI::Icon('C:\Skull & Crossbones.ico'); my $main = Win32::GUI::Window->new(-name => "Main",-size => [250,350]) +; $main->AddButton(-pos => [10,10],-name => "Bar",-text => "Bad Icon"); $main->AddButton(-pos => [10,35],-name => "Bar2",-text => "Good Icon") +; $main->AddNotifyIcon( -name => "Tray", -tip => "Tray", -icon => $okIcon, -id => 222, ); $main->Show(); Win32::GUI::Dialog(); sub Bar_Click { Win32::GUI::NotifyIcon::Modify( $main, -id => 222, -icon => $badIcon, -tip => "Bad", ); } sub Bar2_Click { Win32::GUI::NotifyIcon::Modify( $main, -id => 222, -icon => $okIcon, -tip => "OK", ); } sub Main_Terminate { $main->AddNotifyIcon( -name => "Tray", -tip => '', -icon => '', -id => 222, ); -1; } sub Main_Minimize { $main->Disable(); $main->Hide(); 1; } sub Tray_Click { $main->Enable(); $main->Show(); 1; }

i had a memory leak once, and it ruined my favorite shirt.

In reply to Re: Win32::GUI Task Bar Icon Bug or bad programming? by MZSanford
in thread Win32::GUI Task Bar Icon Bug or bad programming? by LupoX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.