Topic: Please Help

Anyone Tell How to show Running Current Date and Time

Time Is Paused When I Open Form

Re: Please Help

Hi,
Have a look at the attached example;  the time is displayed in the Form's caption but it could just as easily be done as a label.
Derek.

Post's attachments

Attachment icon display time.zip 443.64 kb, 44 downloads since 2023-09-14 

Re: Please Help

Sorry - just realised you wanted date and time (although it's much the same).
See attachment.
Derek.

Post's attachments

Attachment icon display date and time.zip 443.88 kb, 43 downloads since 2023-09-14 

Re: Please Help

not in form title time

any chance running to datetimepicker

5 (edited by k245 2023-09-15 06:56:26)

Re: Please Help

procedure Form1_OnShow (Sender: TObject; Action: string);
var
  Timer: TTimer;
begin
  Timer := TTimer.Create(Form1);
  Timer.Interval := 1000;
  Timer.onTimer := @OnTime;
  Timer.Enabled := True;
end;

procedure OnTime(Sender :TObject);
begin
  Form1.DateTimePicker1.DateTime := Now();
end;

https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9875&download=0

Post's attachments

Attachment icon изображение_2023-09-15_095556600.png 6 kb, 19 downloads since 2023-09-15 

Визуальное программирование: блог и телеграм-канал.

Re: Please Help

k245 wrote:
procedure Form1_OnShow (Sender: TObject; Action: string);
var
  Timer: TTimer;
begin
  Timer := TTimer.Create(Form1);
  Timer.Interval := 1000;
  Timer.onTimer := @OnTime;
  Timer.Enabled := True;
end;

procedure OnTime(Sender :TObject);
begin
  Form1.DateTimePicker1.DateTime := Now();
end;

https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9875&download=0


Working Thank you brother <3