At 21:57 2001-11-01 +0100, Johannes Gamperl wrote:
the next problem i have is that i would like to show a icon in the
system tray on hiding my window. when i click on the icon in the tray
the window should show again ... this works fine, but only for one
time .. the next time my window are closed .. any ideas?
Sounds like you destroy your window when you close it instead of just
hiding it.
the Terminate event handler for the window should Hide() the window, then
return 0 so the destruction is never carried out (0 blocks the "normal
thing for the event" from happening).
This is working code from a tray icon script of mine:
=head2 winRegexpS_Terminate()
Hide window, don't destroy it.
=cut
sub ::winRegexpS_Terminate { defined(my $win =
$Win32::GUI::Loft::window{winRegexpS}) or return(1);
$win->Hide();
return(0);
}
/J
------ ---- --- -- -- -- - - - - -
Johan Lindström Boss Casinos
Sourcerer [EMAIL PROTECTED]
http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail