#!/usr/bin/perl use Tk; use Win32::GUI; our %config = (); my $main = MainWindow->new(     -height => 30,     -width => 50 ); $win32 = Win32::GUI::Window->new(     -name => 'Main',     -text => 'Perl TrayIcon',     -width => 0,     -height => 0,     -visible => 0 ); my $icon = new Win32::GUI::Icon('19.ico'); my $ni = $win32->AddNotifyIcon(     -name => "systray",     -id => 1,     -icon => $icon,     -tip => "Icon in der Systray" ); sub systray_RightClick {     my $systray_menu = new Win32::GUI::Menu(         "SystrayMenu Functions" =>"SystrayMenu",         "> hier klicken" => 'test'     );     my($x, $y) = Win32::GUI::GetCursorPos();     $config{Win32Window}->TrackPopupMenu($systray_menu->{SystrayMenu},   $x, $y-50); } sub test {     print "hallo\n"; } MainLoop;