[Back to DELPHI SWAG index] [Back to Main SWAG index] [Original]

    From: gt6298d@prism.gatech.edu (Chris Randall)

    "J.J. Bakker" <J.J.Bakker@stud.rgl.ruu.nl> wrote:
    >Does anyone know the answer, I', trying to make an app that has an icon in the notification area with a popupmenu. However the application is still visible on the taskbar.
    Using Application.ShowMainForm:=False; is not enough.
    >
    I have run into the same problem but found the answer. This little bit
    of code works great.

    --------------------------------------------------------------------------------

    procedure TMainForm.FormCreate(Sender: TObject);
    begin
      Application.OnMinimize:=AppMinimize;
      Application.OnRestore:=AppMinimize;
      Application.Minimize;
      AppMinimize(@Self);
    end;

    procedure TMainForm.AppMinimize(Sender: TObject);
    begin
      ShowWindow(Application.Handle, SW_HIDE);
    end;

[Back to DELPHI SWAG index] [Back to Main SWAG index] [Original]