http://www.perlmonks.org?node_id=287332


in reply to Tk - always on top property 2

Your hexa hwnd is not the good one :)
Here your script with a little update

Have a nice day :)
use Tk; use Tk::Balloon; use Win32::API; use vars qw/$Button/; my $mw = new MainWindow; $id_mw = $mw->id; $mw->Frame(-width=>200, height =>25); $mw->update; Win32::API->new("user32","SetWindowPos", [qw(N N N N N N N)],'N')->Call(hex($id_mw),-1,0,0,0,0,3); $Button=$mw->Button(-text => "Button", -command => sub { &do_something; })->pack(); my $balloon = $mw -> Balloon(-balloonposition => 'mouse', -initwait => 10, -bg => 'white'); $balloon -> attach($Button, -balloonmsg => "Button"); MainLoop; sub do_something { #sleep(10); }