Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi hiding a form: Is there a difference between Form.Hide and Form.Visible:=False?

I'm looking through two copies of code and in one I have myForm.Hide and another I have myForm.Visible := False. I can't remember why I changed this, if one was a bug fix or whether there is any difference at all.

like image 990
Daisetsu Avatar asked Dec 01 '22 08:12

Daisetsu


1 Answers

There is no difference for Hide. The VCL code is:

procedure TCustomForm.Hide;
begin
  Visible := False;
end;

But Show is a bit different:

procedure TCustomForm.Show;
begin
  Visible := True;
  BringToFront;
end;
like image 66
David Heffernan Avatar answered Dec 04 '22 09:12

David Heffernan