(Gast)
n/a Beiträge
|
AW: OnExit bei Fenster übers X schließen
8. Jul 2016, 14:53
Andere Lösung:
Delphi-Quellcode:
...
protected
procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
end;
...
implementation
{$R *.dfm}
procedure TForm1.WMNCLButtonDown(var Message: TWMNCLButtonDown);
begin
if (Message.HitTest = HTCAPTION) then self.WindowState:= wsMinimized;
if (Message.HitTest = HTCLOSE) then
Begin
//mach hier, was zu tun ist.................
Application.Terminate;
End;
if (Message.HitTest = HTHELP) then
begin ShowMessage('hello world'); message.Result := 0; end
else inherited;
end;
|
|
Zitat
|