关于delphi的编程问题II

来源:百度知道 编辑:UC知道 时间:2024/06/22 17:26:08
我在delphi中添加了状态栏,我现在想在状态栏中显示当前系统日期和当前系统时间(分两栏),代码应该如何写??
Statusbar1.Panels[0].Text:=?
Statusbar1.Panels[1].Text:=?
后面该如何写??
并且时间还要一分一秒的走...

加一个timer控件,system里面有,是一块表的样子,呵呵。
双击进入ontimer事件,然后写下你的代码:
Statusbar1.Panels[0].Text:='系统日期:'+datetostr(Now);
Statusbar1.Panels[1].Text:='系统时间:'+timetostr(Now);

好久没用Delphi了,是Date、Time吧