15.17. Removing the DOS Shell Window with Windows Perl/Tk15.17.1. ProblemYou have written a Perl program for the Windows port of Perl and Tk, but you get a DOS shell window every time you start your program. 15.17.2. SolutionAdd this to the start of your program: BEGIN { if ($^O eq 'MSWin32') { require Win32::Console; Win32::Console::Free( ); } } 15.17.3. DescriptionThe Win32::Console module lets you control the terminal window that launched your program. All you need to do is close that window (or Free it in, in the peculiar parlance of the Windows API) and voilà—no pesky DOS shell window. 15.17.4. See AlsoThe documentation for the Win32::Console module, which is included with distributions of Perl destined for Microsoft systems Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|