Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Answer: How to hide/inhibit the console window when launching a Perl script on Windows?

by jdporter (Canon)
on Mar 13, 2006 at 15:19 UTC ( #536269=categorized answer: print w/replies, xml ) Need Help??

Q&A > GUI Programming > How to hide/inhibit the console window when launching a Perl script on Windows? - Answer contributed by jdporter

The following technique is useful when the window you want to hide isn't the one you're interacting with. You can see the program's console output if you run it from a command prompt; but if you launch the script from Explorer (double-click; Start>Run, etc.), this hides the window.
use Win32::API; sub hide_console { Win32::API->new( 'kernel32', 'FreeConsole', [], 'I' )->Call(); }

  • Comment on Answer: How to hide/inhibit the console window when launching a Perl script on Windows?
  • Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-09-30 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (562 votes). Check out past polls.