Yes I put it in form event .OnWindowStateChange and works.
if frmprincipal.WindowState = wsMinimized then
begin
frmprincipal.Hide;
frmprincipal.ShowInTaskBar := stNever;
TrayIcon1.Show;
end;
Thanks.
-----Mensaje original-----
De: shoKwave [mailto:[email protected]]
Enviado el: viernes, 27 de noviembre de 2009 17:40
Para: Lazarus mailing list
Asunto: Re: [Lazarus] trayicon hide main form icon
Manuel Galeote schrieb:
>
> Using Lazarus on Windows.
> Use a trayicon and have put into the event formresize following form:
> frmprincipal.Hide;
> TrayIcon1.Show;
> Then in the event of trayicon OnDblClick this:
> frmprincipal.Show;
> TrayIcon1.Show;
> The icon trayicon looks and performs its function correctly.
> The main form icon is always on the taskbar. How I make disappear when
> the form is minimized?.
>
> ------------------------------------------------------------------------
>
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
I use:
Form1.Hide;
Form1.ShowInTaskBar:=stNever;
TrayIcon1.Show;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus