HideForTime (Delphi)
Description
This code uses a button, a timer, and a maskedit on a form. When you click the button, the form disappears for the period of time specified in the Interval property of the timer control, then the form reappears.
Code
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;
Uses
- Vcl.ExtCtrls.TTimer.Interval ( fr | de | ja )
- Vcl.Forms.TCustomForm.Hide ( fr | de | ja )