Can you explain how the -ontimer option works?
-onTimer => \&T1_Timer,
The onTime is the event handler for all timers for a specific window. In the
example below, we're adding 4 timers to the window. When the timer is fired,
it's name is printed out. Does that help?
Cheers,
jez.
use strict;
use Win32::GUI;
my $mw = Win32::GUI::Window->new(
-name => 'mw',
-size => [400, 400],
-pos => [200, 200],
-onTerminate => sub{return -1;},
-onTimer => sub{print $_[1]."\n"},
);
$mw->AddTimer('Slow', 2000);
$mw->AddTimer('Medium', 1000);
$mw->AddTimer('Quick', 500);
$mw->AddTimer('Very Quick', 250);
$mw->Show;
Win32::GUI::Dialog;