Forms Delphi

Form basliklari, calisma esnasinda gizlenip tekrar gösterilebilir.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure sakla;
procedure goster;

end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure tform1.sakla;
var
save:longint;
begin
if borderstyle=bsnone then exit;
save:=getwindowlong(handle,gwl_style);
if (save and ws_caption)=ws_caption then
begin
case borderstyle of
bssingle,bssizeable: setwindowlong(handle,gwl_style,save and (not(ws_caption)) or ws_border);
bsdialog:setwindowlong(handle,gwl_style,save and (not(ws_caption)) or ds_modalframe or ws_dlgframe);
end;
height:=height-getsystemmetrics(sm_cycaption);
refresh;
end;
end;
procedure tform1.goster;
var
save:longint;
begin
if borderstyle=bsnone then exit;
save:=getwindowlong(handle,gwl_style);
if (save and ws_caption)<>ws_caption then
begin
case borderstyle of
bssingle,
bssizeable: setwindowlong(handle,gwl_style,save or ws_caption or ws_border);
bsdialog:setwindowlong(handle,gwl_style,save or ws_caption or ds_modalframe or ws_dlgframe);
end;
height:=height+getsystemmetrics(sm_cycaption);
refresh;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
sakla
end;
procedure TForm1.Button2Click(Sender: TObject);
begin goster
end;
end.