Re: how to prevent the console from appearing ?




On Feb 5, 2005, at 7:06 AM, luc2 wrote:

when i execute a gtk-perl program, a console window appears. is it possible
to prevent it from appearing ?

looks like you need to run your script with wperl instead of perl.

http://www.codecomments.com/archive234-2004-4-169540.html


unless you can figure out from these docs how to close the console yourself.

http://aspn.activestate.com/ASPN/docs/ActivePerl/site/lib/Win32/ Console.html


i'm using activeperl on windows, but i think it would be the same under
linux; if i double-click on my script, a console would also appear under
linux...

not at all. it's a side effect of how windows does console apps, and a holdover from the dos/win9x days. windows programs are supposed to start with WinMain() instead of main(); programs that start with main() have a console allocated automatically,, which creates a console window if it's not already hooked up to one.


--
Walk softly, and carry a BFG-9000.
  -- unknown




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]