I am new to Win32::GUI . I have written a basic program (copied from examples) as below
use Win32::GUI; $main = Win32::GUI::Window->new( -name => "Main", -title => "Win32-GUI: Doevents-Demo", -left => 100, -top => 100, -width => 600, -height => 400, ); sub Main_Terminate() { print "Main window terminated\n"; return -1; } $textfield = $main->AddTextfield( -name => "Textfield", -text => "have fun and more", -left => 75, -top => 150, -width => 200, -height => 40, -readonly => 1, ); $main->Show(); $textfield->Text("Processing infile..."); for ($linenr=0;$linenr<2000;$linenr++) { print "$linenr\n"; $textfield->Text("Processing line $linenr"); $main->DoEvents(); sleep 1; #body of the loop... } The problem is that when I minimise window , the counting in the for loop stops ! That is value of $linenr does not increment ! After checking I found out that program stops at Doevents function when window is minimised ! The moment I restore the minimised window, the counting proceeds ! Can somebody tell me what am I doing wrong ?? Operating system W2K Service pack 3 perl v5.6.1 Win32::GUI - 0.0.665 With Best Regards, Vidyadhar