Win32::HideConsole - Use this in GUI applications (Tk, Win32::GUI, etc.) to hide that annoying console window that appears at execution time.
use Tk; use Win32::HideConsole; hide_console; my $main_window = MainWindow->new(); $main_window->Label(-text => 'A GUI app with the console hidden!', -font => 'arial 14')->pack(-side => 'top'); $main_window->MainLoop();
Uses some Win32::API commands to hide the annoying console window that accompanies GUI applications (Tk, Win32::GUI, etc.).
Only a single exported method is provided:
Place this command near the beginning of your code (right after the "use" directives) to hide the console window.
Credit goes to "jdporter" who posted this clever solution on PerlMonks. I just modified it a bit and put it in module form for easy reusability.
Copyright(C) 2009, phatWares, USA. All rights reserved.
Permission is granted to use this software under the same terms as Perl itself. Refer to the Perl Artistic license for details.