private
    { Private declarations }
    fOldClientHeight: Integer;
    procedure WMNCRButtonDown(var Msg: TWMNCRButtonDown) ; message WM_NCRBUTTONDOWN;

procedure TForm1.WMNCRButtonDown(var Msg: TWMNCRButtonDown);
var
   h : integer;
begin
   if (Msg.HitTest = HTCAPTION) then
   begin
     if (ClientHeight = 0) then
     begin
       for h := 0 to fOldClientHeight do ClientHeight := h;
       Application.ProcessMessages;
     end
     else
     begin
       fOldClientHeight := ClientHeight;
       for h := fOldClientHeight downto 0 do ClientHeight := h;
       Application.ProcessMessages;
     end;
   end;
end;  
 
原始出處:About Delphi Programming
文章標籤
全站熱搜
創作者介紹
創作者 elsun 的頭像
elsun

幸福快樂的淺藍色小風之安全堡壘

elsun 發表在 痞客邦 留言(0) 人氣(43)