Einzelnen Beitrag anzeigen

hathor
(Gast)

n/a Beiträge
 
#2

AW: Kontextsensitive Hilfe / biHelp-Button trotz Minimize-Button?

  Alt 20. Dez 2015, 13:47
Dann mach es so:

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 Application.Terminate;
  if (Message.HitTest = HTHELP) then
  begin ShowMessage('hello world'); message.Result := 0; end
  else inherited;
end;
  Mit Zitat antworten Zitat