Thema: Delphi Minimierungsprobleme

Einzelnen Beitrag anzeigen

Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#6

Re: Minimierungsprobleme

  Alt 10. Aug 2005, 14:30
Form Restore / welches Ereignis, Message

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, ... ;

type
  TFormX = class(TForm)
    procedure WMSysCommand(var Message: TWMSysCommand); message WM_SYSCOMMAND;

  ...

implementation

...

procedure TFormX.WMSysCommand(var Msg: TWMSysCommand);
begin
  case (Msg.CmdType and $FFF0) of
     SC_MINIMIZE: begin
                    TrayIcon.Active := True; // Trayicon Anzeigen
                    FormX.Hide; // Form verstecken
                  end;
     // SC_RESTORE : ;
     // SC_MAXIMIZE: ;
     // SC_CLOSE: ;
     else
       inherited;
  end;
end;
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat