toadi has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I developed a nice program in Tk. But in windoze in notice that when started it opens first a dos-box then the program. Well, I hate that. Is there a way to stop that? I mean that there are not to entries in my taskbar...


My opinions may have changed,
but not the fact that I am right

Replies are listed 'Best First'.
Re: Tk and windoze
by the_slycer (Chaplain) on Jan 26, 2001 at 18:57 UTC
Re: Tk and windoze
by Caillte (Friar) on Jan 26, 2001 at 15:47 UTC

    perl2exe, when used to compile in gui mode will open a program without opening a dos box first.

    Unfortunately, to do this you need to register and pay for the program first :P

    $japh->{'Caillte'} = $me;
      After browsing through the CookBook this AM on the train, I think I may have found a neat way around this (registering to get the gui).. I'm not sure whether or not I can quote it in full here, but if you have the book you can flip to page 544. Title is "Removing the DOS Shell Window with Windows Perl/Tk"

      Basically, you use a seperate perl program to launch the TK window. It makes use of Win32::Process - runs the TK prog as a detached process etc.. kinda fun. I haven't tried this yet but plan to "real soon now" You could then compile into an exe and run the exe to launch the TK app.

      If someone tells me that it's alright to quote the CookBook I will post the code here..

      <bold>Update:</bold> It works, I have a seperate program to launch a TK app, DOS window flashes and it goes away..
Re: Tk and windoze
by toadi (Chaplain) on Jan 26, 2001 at 14:34 UTC
    erm,

    Found one solution. I created a .bat file with:
    start wperl myperlprog.pl

    And there you go the proggie started on it's own.
    Does someone has another solution?


    My opinions may have changed,
    but not the fact that I am right

(Guildenstern) Re: Tk and windoze
by Guildenstern (Deacon) on Jan 26, 2001 at 21:54 UTC