Hi,
Lazarus v0.9.25 r15649M i386-win32-win32/win64 on windows XP.
I am working on a TrayIcon gadget and want it to minimize to the tray.
Only problem is I can't seem to catch the Minimize event. I found a
tutorial on the net based on Delphi and it used the following code:
procedure TMainForm.FormCreate(Sender: TObject);
begin
Application.OnMinimize := @MinimizeMe;
end;
procedure TMainForm.MinimizeMe(Sender: TObject);
begin
Visible := False;
end;
But MinimizeMe is never called.
Then I tried:
procedure TMainForm.FormWindowStateChange(Sender: TObject);
begin
If WindowState = wsMinimized then
Visible:=false;
end;
But that never gets called either :-(
Any hints are most welcome
Take care
Søren
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus