Jeremy White wrote:


I know you can test if a Win32::GUI window has been minimized, but can you run a sub if a DOS window has been minimized?


Yes.

If you want to "remove" the DOS window during development of a script, you can run it via the command wperl rather than with the command perl.

No, I'm trying to minimize to tray, I've got the trayicon setup and when you click it, it hides the window:

sub _Systray_Click {
   if(Win32::GUI::IsVisible($DOS)) { Win32::GUI::Hide($DOS); }
   else { Win32::GUI::Show($DOS); }
}

Now I want to be able to test if the user has minimized the DOS box and minimize it to the tray. With a Win32::GUI::Window you can just create a sub like this:

$window = new Win32::GUI::Window( -name => "_window");

sub _window_Minimize {
   $window->Hide();
   return 0;
}

But a DOS window is created this way and I see no way in the docs to 'name' a DOS window, only to get it's handle:

($DOS) = Win32::GUI::GetPerlWindow();

So, how do I test if the DOS window has been minimized?

Roger Mayfield

Reply via email to