Сергей Черниенко wrote:
LS> Change
LS> my $mw = Win32::GUI ...
LS> To
LS> our $mw = Win32::GUI ...
LS> This will allow the timer subroutine to see the $mw object.

That'll make no difference. The subroutine can already see the lexically scoped variable.

sub CheckDir_Timer {
   $mw->>Hide() if $mw->IsVisible();
   $mw->>Show() unless $mw->IsVisible();
   return 1;
}

Check your logic here.

If your window is visible, you hide it, then on the next line you show it again if it's hidden (which it is because you hide it on the previous line)

try

sub CheckDir_Timer {
  if ($mw->IsVisible()) {
    $mw->Hide();
  }
  else {
    $mw->Show();
  }

  return 1;
}

Regards,
Rob.

Reply via email to