Ace128 has asked for the wisdom of the Perl Monks concerning the following question:
What am I missing? Im using Win32::GUI v1.0 btw.#!/usr/bin/perl use warnings; use strict; use Win32::GUI; my $mw_win32; &do_win32_stuff; sub do_win32_stuff{ $mw_win32 = new Win32::GUI::Window( -width => 0, -height => 0, -name => 'MainWindow'); my $icon = new Win32::GUI::Icon('icon.ico'); new Win32::GUI::NotifyIcon($mw_win32, -name => "SysTray", -id => 1, -icon => $icon, -tip => "I\'am in the Systray!"); my $call = Win32::GUI::Dialog(); $mw_win32->Notify->Delete(-id => 1); } sub SysTray_RightClick { my $systray_menu = new Win32::GUI::Menu( "SystrayMenu Functions" => "SystrayMenu", "> Info" => "SystrayInfo", "> Exit" => "SystrayExit" ); my($x, $y) = Win32::GUI::GetCursorPos(); $mw_win32->TrackPopupMenu($systray_menu->{SystrayMenu}, $x, $y); 1; } sub SystrayExit_Click { print "WORK FOR GOD SAKE!!\n"; exit; } sub Main_Terminate { Win32::GUI::NotifyIcon::Delete( $mw_win32, -id => 1 ); return -1; } sub SysTray_Terminate { Win32::GUI::NotifyIcon::Delete( $mw_win32, -id => 1 ); return -1; } sub Main_Minimize { $mw_win32->Disable(); $mw_win32->Hide(); 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Functions aint called using Win32::GUI::NotifyIcon
by Ace128 (Hermit) on Jun 15, 2005 at 00:05 UTC | |
|
Re: Functions aint called using Win32::GUI::NotifyIcon
by monarch (Priest) on Jun 15, 2005 at 00:14 UTC | |
by Ace128 (Hermit) on Jun 15, 2005 at 01:45 UTC |