in reply to Re: How do you toggle the system tray icon using Win32::Gui?
in thread How do you toggle the system tray icon using Win32::Gui?

Yeah, OK, this is old, but if I found it someone else may also. Now it's a wiki.

In current form (ActiveState 5.8.8), the 'Win32::GUI::NotifyIcon::Modify' method is gone and so is the '-id' option. Use of the former will fail and use of the latter will produce a warning.

'ModifyIcon' has been replaced by a 'Change' method. So to do smooth animation - like what was being attempted here, you do something like:

our $ni; $ni = $win->AddNotifyIcon ( -icon => $ico[0], -tip => "Look both ways before crossing the street", );

Then in the timer:

$ni->Change( -icon => $ico[$index] );

Sean