You can do this a number of ways. In order to allow a user to close the Icon
and thus the app, you need to call Win32::GUI::Dialog, right. You can each
launch the code to run in the background two ways:

1- have a button or something else on the Window to start it, or
2- use the Timer method to get it (another sub) running. However, be sure to
occassionally call Win32::GUI::DoEvents so that it will catch a _Terminate
or other event from the Window. Also be sure that the "other" sub stops the
Timer or else it will launch the background sub again and again and again...

 
-Pete


> -----Original Message-----
> From: Nigel Cannings [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 15, 2004 12:17 PM
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: [perl-win32-gui-users] Avoiding applications hanging?
> 
> 
> hi there
> 
> I have a console application, that I want to have show an 
> icon on the status
> bar - This is no problem with Win32::GUI::Icon.
> 
> However, I do not want the application to hang, waiting for 
> an event from
> the (hidden) window - Really the icon is there to show the 
> console app is
> running, and also to be clicked to exit.
> 
> Is there any way to display the icon, but allow the main 
> application to
> carry on doing its thing in the background (my application is 
> listening for
> a socket connection)
> 
> Many thanks
> 
> Nigel
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 

Reply via email to