#!/usr/local/bin/perl -w use Tk; use Win32::API; use Tk::JPEG; use Tk::StayOnTop; use Win32::Sound; my $boss_key = 0x04; #Middle Mousecursor #my $boss_key = 0x1b; #Escape my $exit_key = 0x5b; #Windows Key my $title = 'IDEAL Versicherung'; my $current_vol = Win32::Sound::Volume(); my $main = new Tk::MainWindow( -title => $title ); $main->geometry('1024x768'); $main->FullScreen(1); my $image = $main->Photo('-format' => 'jpeg', -file => 'boss.jpg'); $main->Label(-image => $image)->pack(); Win32::API->Import('user32', 'GetAsyncKeyState', 'I', 'I'); my $vis = 1; $main->repeat(50, \&read_stuff); MainLoop; sub read_stuff { if ($vis == 1) { $main->stayOnTop; $main->focus; } &switch_vis if ((GetAsyncKeyState($boss_key) & 1) == 1); exit if ((GetAsyncKeyState($exit_key) & 1) == 1); } sub switch_vis { if ($vis == 0) { $main->deiconify; $current_vol = Win32::Sound::Volume(); Win32::Sound::Volume(0); } else { $main->withdraw; Win32::Sound::Volume($current_vol); } $vis = !$vis; }