> Trying to put an icon in the system tray because when a program runs, > but don't want a GUI window. Here is what I am doing, but missing > something...Does anyone know of a good doc for the Win32-GUI? The docs > provided seem a bit skimpy. > Thanks in advance. > > sub Win_GUI > { > > $SysTrayICON = new Win32::GUI::Icon('./PERL.ICO'); > > }
The best docs for this is the list archives. You need a 'parent' to add a system tray icon. But this doesn't mean you have to show the parent window. my $icon = new Win32::GUI::Icon('c:/1.ico'); my $Window = new Win32::GUI::Window ( -name => "Window", -left => 300, -dialogui => 1, -top => 100, -left => 100, -width => 400, -height => 400, -text => 'test1', ); $Window->Enable(); my $ni = $Window->AddNotifyIcon( -name => "NI", -id => 1, -icon => $icon, -tip => "some tip text that must be less than 63 characters" ); $Window->Hide; -- Nathaniel G. Bartusiak TTMS, Keesler AFB