...eine Form bei Rechtsklick auf Titelleiste verkleinern?
Autor: Thomas Stutz
type
TForm1 = class(TForm)
private
{ Private-Deklarationen }
FOldHeight: Integer;
procedure WMNCRButtonDown(var Msg: TWMNCRButtonDown); message WM_NCRBUTTONDOWN;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WMNCRButtonDown(var Msg: TWMNCRButtonDown);
begin
if (Msg.HitTest = HTCAPTION) then
if (ClientHeight = 0) then
begin
ClientHeight := FOldHeight;
Application.ProcessMessages;
end
else
begin
FOldHeight := ClientHeight;
ClientHeight := 0;
Application.ProcessMessages;
end
end;
printed from
www.swissdelphicenter.ch
developers knowledge base