On 12/1/2010 4:10 μμ, Nele Kosog wrote:
> Hi,
>
> I have compiled an executable using the following command:
> "pp -x --gui -o my_program.exe my_program.pl"
>
> While --gui blocks the console window for the main application, it does
> not seem to prevent other console windows from opening.
>
> my_program.pl uses two command line tools to calculate something. When I
> run the pp'ed executable, the my_program.exe opens a new console window
> for each call to one of the command line tools.
>
> Are there means to prevent this? I have searched for this option, but
> only find the --gui switch description.
>
> Thank you for your help!
> Regards,
> Nele
>From activeperl's faq, other variants use some other technique maybe ?
BEGIN {
my ($DOS) = Win32::GUI::GetPerlWindow();
#hide console window
if ( $DOS ) {
Win32::GUI::Hide($DOS) unless ($ARGV[0] eq '--keep');
}
# hide children windows
if ( defined &Win32::SetChildShowWindow ){
Win32::SetChildShowWindow(0);
}
}