我做了一个用按钮实现显示、隐藏窗体,试一下:
procedure TForm1.FormCreate(Sender: TObject);
begin
do
Invisible;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if Button1.Caption = 'Show' then
begin
do
Visible;
Button1.Caption := 'Hide';
end
else
begin
do
Invisible;
Button1.Caption := 'Show';
end;
end;