How do I ensure that the counter continues running when the window is minimized?

Thanks

-snip-

use strict;
use Win32::GUI;
my $count = 0;

my $W = new Win32::GUI::Window(
     -left   => 558,
     -top    => 122,
     -width  => 300,
     -height => 255,
     -name   => "W",
     -text   => "Test"
     );

$W->AddLabel(
      -text    => "$count",
      -name    => "count",
      -left    => 10,
      -top     => 10,
      -width   => 30,
      -height  => 13,
      -foreground    => 0,
     );

$W->AddButton(
      -text    => "start",
      -name    => "start",
      -left    => 126,
      -top     => 144,
      -width   => 42,
      -height  => 21,
      -foreground    => 0,
     );

$W->Show();
Win32::GUI::Dialog();

sub start_Click {
 while (1) {
   Win32::GUI::DoEvents();
   sleep 1;
   $count++;
   $W->count->Text($count);
 }
}





_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp


Reply via email to