Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Tk on Win32 - how to avoid background console window

by mawe (Hermit)
on Jan 18, 2005 at 05:16 UTC ( [id://422891]=note: print w/replies, xml ) Need Help??


in reply to Tk on Win32 - how to avoid background console window

Hi!

I don't work with Windows and I'm not a saint, but I do have a Perl Cookbook :-) The solution there is: Start your program through another Perl script. Here is the snippet:

#!/usr/bin/perl -w # loader - starts Perl scripts without the annoying DOS window use strict; use Win32; use Win32::Process; # Create the process object. Win32::Process::Create($Win32::Process::Create::ProcessObj, 'C:/perl5/bin/perl.exe', # Whereabouts of Perl 'perl realprogram', # 0, # Don't inherit. DETACHED_PROCESS, # ".") or # current dir. die print_error(); sub print_error() { return Win32::FormatMessage( Win32::GetLastError() ); }
Regards, mawe

Replies are listed 'Best First'.
Re^2: Tk on Win32 - how to avoid background console window
by biochris (Beadle) on Jan 18, 2005 at 14:05 UTC
    Sounds great. Thank you very much.
Re^2: Tk on Win32 - how to avoid background console window
by biochris (Beadle) on Jan 21, 2005 at 20:05 UTC
    You don't work on Windows and you are not a saint, but you sure gave me the right answer. Thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://422891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-19 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found