From: Lloyd, S. <Ste...@la...> - 2005-08-03 15:36:21
|
Change my $mw =3D Win32::GUI ... To our $mw =3D Win32::GUI ... This will allow the timer subroutine to see the $mw object. Steve Lloyd If the world didn't suck, we would probably all just fall off. http://www.basgetti.com -----Original Message----- From: per...@li... = [mailto:per...@li...] On Behalf Of = cr...@pf... Sent: Wednesday, August 03, 2005 9:12 AM To: per...@li... Subject: [SPAM] - [perl-win32-gui-users] timer do not work - Email found = in subject =FA=C4=D2=C1=D7=D3=D4=D7=D5=CA=D4=C5, perl-win32-gui-users, I wrote simple script with timer. It's supposed that timer hides/shows main window but window is always visible. What's the matter? use strict; use Win32::GUI; my $mw =3D Win32::GUI::Window->new(-size =3D> [400, 400], -pos =3D> [200, 200], -title =3D> "FormsTest", -onTerminate =3D> sub{return-1;}, ); $mw->AddTimer("CheckDir", 2000); $mw->Show; Win32::GUI::Dialog; sub CheckDir_Timer { $mw->Hide() if $mw->IsVisible(); $mw->Show() unless $mw->IsVisible(); return 1; } Thanks. --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =F3=C5=D2=C7=C5=CA = mailto:cr...@pf... ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies = from IBM. Find simple to follow Roadmaps, straightforward articles, = informative Webcasts and more! Get everything you need to get up to = speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick _______________________________________________ Perl-Win32-GUI-Users mailing list = Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users This email, and any files previous email messages included with it, may = contain confidential and/or privileged material. If you are not the = intended recipient please contact the sender and delete all copies. |