Hello Hoff,
I wasn't able to come up with a way to change the icon in the system
tray. My solution was to kill off the current tray icon and create a
new one whenever it need to be changed. In order to get this to work
properly I had to assign an "id" to each one, and increment it so that
whenever I killed off the icon and created a new one it had a new id.
I know my explanation doesn't make much sence... hopefully my code
will explain it better. If someone does know how to change the icon I
would love to hear about it as well.
### Code Segments Below ###
### Not a complete script ###
##--------------------------------------------------------------
sub Add_Tray {
$TrayCount++; ##--> Increment TrayIcon ID#
$TIcon = $Window->AddNotifyIcon( -name => "TrayIcon",
-id => $TrayCount,
-icon => $Icon,
-tip => "$tip",
);
}
$Window->TrayIcon->Delete(-id => $TrayCount); ##--> Del Tray Icon
&Add_Tray($cond); ##--> Create new TrayIcon with updated tips
Monday, March 20, 2000, 11:33:51, you wrote:
HM> This sets the icon correctly to tool.ico:
HM> my $icon = new Win32::GUI::Icon("tool.ico");
HM> $trayicon = $Window->AddNotifyIcon(-name => "TrayIcon", -id=>1,-icon => $icon,
-tip =>> "$title");
HM> Now, I'd like to change the icon based on a timer in the program. I can change
HM> the window's icon but not the system tray icon. Is it possible to dynamically
HM> change the system tray icon?
HM> Hoff Miller
--
Best regards,
Cam mailto:[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com