小虾给你一个变通的办法吧.<br><br>unit main;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> private<br> procedure WMGETMINMAXINFO(var message:TWMGetMinMaxInfo);message WM_GeTMINMAXINFO;<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.WMGETMINMAXINFO(var message:TWMGetMinMaxInfo);<br>begin<br> message.MinMaxInfo.ptMaxSize.x:=0;<br> message.MinMaxInfo.ptMaxSize.y:=0;<br> message.MinMaxInfo.ptMaxPosition.x:=0;<br> message.MinMaxInfo.ptMaxPosition.y:=0;<br>// Caption:=format('%d',[clientheight]);<br> if ClientHeight<=0 then<br> EnableMenuItem(GetSystemMenu(Handle, False), SC_CLOSE, MF_BYCOMMAND or MF_GRAYED)<br> else<br> EnableMenuItem(GetSystemMenu(Handle, False), SC_CLOSE, MF_ENABLED);<br>end;<br><br>end.<br><br>