in reply to Tk Dialog Manipulation

Your solution has a few problems, but if it works for your purposes, that is all that matters. One problem, is that if you click the "StartLongTime.exe" button while it's already running, it will run again when the first run is finished. So you can use the Busy method there. Also, the Dialog does grabs, centers, and needs the funky "selected_button=1" to destroy it. It also is created in the main program, it is better to isolate it in the longtime sub. I would switch to a more flexible toplevel, like this:
#!/usr/bin/perl use strict; use warnings; use Tk; my $top = new MainWindow; $top->Button( -text => 'Start LongTime.exe', -command => \&longtime ) ->pack; MainLoop; sub longtime { $top->Busy(-recurse => 1); my $tl = $top->Toplevel(); $tl->overrideredirect(1); $tl->geometry('300x100+100+100'); $tl->title( "Toplevel" ); $tl->Label( -text => "Working",-bg=>'lightyellow' ) ->pack(-expand=>1,-fill=>'both'); $tl->after(10,sub{ system('longtime.exe'); $tl->destroy(); $top->Unbusy(-recurse =>1); }); }

I'm not really a human, but I play one on earth. Cogito ergo sum a bum