perl - Win32::GUI update tray icon does not work -


the tray icon not change. cause? i'm using latest strawberry perl v5.20.2 x86, win32::gui v1.11, windows 7 x64.

use strict; use warnings; use win32::gui;   $main = win32::gui::window->new( -name => 'main', -text => 'perl', -width => 200, -height => 200 );  $icon = new win32::gui::icon('1-0.ico'); $ni = $main->addnotifyicon( -name => "ni", -icon => $icon );  $icon2 = new win32::gui::icon('0-0.ico');   win32::gui::dialog(); while(1) {     $ni->change( -icon => $icon );     sleep(5);     $ni->change( -icon => $icon2 );     sleep(5); } 

win32::gui::dialog(); 

must put after while loop in order work. :(


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -