RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.Hide Method

Hides the form.

Pascal
procedure Hide;
C++
__fastcall Hide();

Hide sets the Visible property to false.  

C++ Examples: 

 

/*
This code uses a button, a timer and a maskedit on a
form. When the user clicks the button, the form
disappears for the period of time specified in the
Interval property of the timer control, then the form
reappears:
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Timer1->Enabled = true;
  Hide();
}

void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  Visible = true;
  Timer1->Enabled = false;
}

 

Delphi Examples: 

{
This code uses a button, a timer and a maskedit on a
form. When the user clicks the button, the form
disappears for the period of time specified in the
Interval property of the timer control, then the form
reappears:
}
procedure TForm1.Button1Click(Sender: TObject);
begin
  Timer1.Interval := StrtoInt(MaskEdit1.Text);
  Timer1.Enabled := True;
  Hide;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Visible := True;
  Timer1.Enabled := False;
end;

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!