> Здравствуйте, 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?
Your if() logic in CheckDir_Timer sub. If you look closely, you will see that the window gets hidden and then shown again immediately after. You tell it to Hide if visible and immediately after you tell it to show if it is not. Try this one instead: sub CheckDir_Timer { if ($mw->IsVisible()) { $mw->Hide(); } else { $mw->Show(); } return 1; } > sub CheckDir_Timer { > $mw->Hide() if $mw->IsVisible(); > $mw->Show() unless $mw->IsVisible(); > return 1; > }