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

Hi All,

I have created a Tool using Perl and Tk. I am executing other applications through my Tool, one by one for (e.g. MSWord, Acrobat, etc.) doing some process. When other applications opened my Tool send back to the newly opened Application. 

But I want to keep my Tool always at the front of all applications. Is it possible? How can I achieve this?

Regards,

Srikrishnan 

Replies are listed 'Best First'.
Re: set my widget top of all applications
by Anonymous Monk on Jul 17, 2009 at 06:07 UTC
      Hi,
      
      Thanks for your guidance. It works perfectly when I run the perl file.
      
      
      But if i make exe using PAR module. It wont work eventhough I have called all the dependencies through argument file.
      
      
      
      Can anybody help me to solve this problem?
      
      
      
      Regards,
      
      
      Srikrishnan
      
      
        I don't know what technique you are using to keep your window on top. But a more foolproof way, is to set a timer, that raises your chosen window every 10 ms (or so). This may not work, if your window manager settings are "focus follow mouse" or some similar setting.
        #!/usr/bin/perl use Tk; use strict; use warnings; my $top = new MainWindow; keep_on_top($top); MainLoop; sub keep_on_top { my $w = shift; my $toprepeater = $w->repeat(10, sub{ $w->deiconify; $w->raise; }); }

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku