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

Hi, I want to replace the icon image of application build using perl Tk. Please note I don't want the icon to be changed but I want to replce the Tk image present in the executable application created through perl App. Current command: perlapp --icon C:\Users\Abc\Documents\abc.ico --norunlib --nomanifest --clean --dyndll --gui --force --exe test.exe test.pl.
  • Comment on How to remove Tk icon from the app build using perl Tk

Replies are listed 'Best First'.
Re: How to remove Tk icon from the app build using perl Tk
by marto (Cardinal) on May 11, 2012 at 11:03 UTC

    Facicons are for web pages, not applications. This relates to your application, rather than the packaging of the application.

    use strict; use warnings; use Tk; my $mw = MainWindow->new; $mw->title("Icon test"); # comment out the next two lines to see the red Tk logo in the to left my $xpm = $mw->Photo(-file => "testicon.xpm", -format => 'xpm'); $mw->Icon(-image => $xpm); $mw->Button(-text => "Done", -command => sub { exit })->pack; MainLoop;
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: How to remove Tk icon from the app build using perl Tk
by Anonymous Monk on May 11, 2012 at 10:55 UTC
      No, see if you'll create any app using PDK app and then if you'll open those app then in left hand side of that GUI app you'll find a Tk symbol in red color with stylish font. I just want to know how to replace that icon with our any icon file.

        No, see if you'll create any app using PDK app and then if you'll open those app then in left hand side of that GUI app you'll find a Tk symbol in red color with stylish font. I just want to know how to replace that icon with our any icon file.

        No? That is exactly the topic of the link, slow down, don't be quick to dismiss

        $mw->idletasks; # this line is crucial $mw->iconimage($icon);