//再来一个完整的程序,呵呵。。。。<br><br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> Button2: TButton;<br> procedure Button1Click(Sender: TObject);<br> procedure Button2Click(Sender: TObject);<br> private<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.Button1Click(Sender: TObject);<br>begin<br> SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and (not WS_CAPTION));<br> ClientHeight:=Height;<br> ClientWidth:=Width;<br>end;<br><br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br> SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) or (WS_CAPTION));<br> Height:=ClientHeight;<br> Width:=ClientWidth;<br>end;<br><br>end.<br>