Type
TForm1 = Class(TForm)
Procedure FormCreate(Sender: TObject);
procedure HideControls;
procedure ShowControls;
procedure FormClick(Sender: TObject);
End;
Var
Form1: TForm1;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate(Sender: TObject);
begin
form1.HideControls;
form1.Caption := 'klicka på formen för att visa alla kontroller igen';
End;
Procedure Tform1.HideControls;
Var i:integer;
Begin
For i := 0 To form1.ControlCount -1 Do
Begin
form1.Controls[i].Visible := false;
End;
end;
Procedure Tform1.ShowControls;
var i:integer;
Begin
For i := 0 To form1.ControlCount -1 Do
Begin
form1.Controls[i].Visible := True;
End;
End;
Procedure TForm1.FormClick(Sender: TObject);
Begin
form1.ShowControls;
End;
End.