From: Carolyyne C. <car...@ho...> - 2001-04-07 16:51:42
|
I get the following error: Can't locate auto/Win32/GUI/DoEvents.al in @INC when using: $abort = Win32::GUI::DoEvents(); Help!! Thanks, This is what I'm trying to do - is there a better way? ### use Win32::GUI; use strict; my $M = new Win32::GUI::Menu( "&File" => "File", " > &Stop" => "stop", " > -" => 0, " > &Go" => "go", ); my $W = new Win32::GUI::Window( -name => "W", -text => "Stop go", -left => 100, -top => 100, -width => 400, -height => 300, -menu => $M, ); $W->AddLabel( -text => "you can stop the process anytime you want, I hope!", -name => "event", -left => 50, -top => 50, ); ## $W->Show(); Win32::GUI::Dialog(); ## sub W_Terminate { -1; } sub go_Click { $W->event->Text("now running"); &run; } sub stop_Click { $W->event->Text("now stopped"); } sub run { my $c = 1; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; $W->event->Text("Done, returning control!"); } _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |