public
tmp:integer;
....
procedure TForm1.FormCreate(Sender: TObject);
begin
tmp:=height-clientheight;
end;
//取消标题栏
procedure TForm1.Button1Click(Sender: TObject);
begin
SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) AND NOT WS_CAPTION);
ClientHeight:=ClientHeight+tmp;
end;
//显示标题栏
procedure TForm1.Button2Click(Sender: TObject);
begin
SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) OR WS_CAPTION);
ClientHeight:=ClientHeight-tmp;
end;
不过效果不是很好,自己试试。