Typically I separate the processes and write a service and a
controller.  The tray icon belongs to the controller and communicates
its desires to the service  as needed.  This seems like a clearer
approach than DoEvents(), although the IPC may be overkill if the tray
icon doesn't expose a lot of functionality.

~Darrik Mazey


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Geoffrey Spear
> Sent: Wednesday, June 20, 2007 8:40 AM
> To: [EMAIL PROTECTED]
> Cc: perl-win32-gui-users@lists.sourceforge.net
> Subject: Re: [perl-win32-gui-users] Service with Trayicon and Popup-menu
>
> I'm not exactly clear on how you go about adding a tray icon with a
> Win32::Daemon since, if I understand correctly, the daemon runs in the
> background before a user is even logged in (which I'd assume is also
> the reason the daemon can't call Win32::GUI::Dialog).
>
> Is it possible to call Win32::GUI::DoEvents() in your daemon when it's
> needed and stop the loop that's calling it when your daemon is going
> back to acting like a daemon?
>
> Or would it make sense (it does to me, but then I'm a UNIX person by
> background) to have a completely separate process that handles user
> interaction with the daemon, which itself just runs in the background
> with no UI of its own?
>
> Geoffrey
>   


Reply via email to