刘 刘李子 Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-25 #2 procedure TForm1.Timer1Timer(Sender: TObject); var Present: TDateTime; Hour,Min,Sec,MSec:Word; begin Present:= Now; DecodeTime(Present,Hour,Min,Sec,MSec); StatusBar1.Panels[0].Text :=IntToStr(Hour)+':'+IntToStr(Min)+':'+IntToStr(Sec); end;
procedure TForm1.Timer1Timer(Sender: TObject); var Present: TDateTime; Hour,Min,Sec,MSec:Word; begin Present:= Now; DecodeTime(Present,Hour,Min,Sec,MSec); StatusBar1.Panels[0].Text :=IntToStr(Hour)+':'+IntToStr(Min)+':'+IntToStr(Sec); end;
C csgcsw Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-29 #3 同意刘李子,如果要保持与当前时间一致,可加入Timer控件。
C cnaoszh Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-30 #6 procedure TForm1.Timer1Timer(Sender: TObject); begin StatusBar1.Panels[0].Text :=FormatDateTime('yyyy-mm-dd',date)+FormatDateTime('-AM/PM hh:mm:ss ',Time) end;
procedure TForm1.Timer1Timer(Sender: TObject); begin StatusBar1.Panels[0].Text :=FormatDateTime('yyyy-mm-dd',date)+FormatDateTime('-AM/PM hh:mm:ss ',Time) end;
心 心动痕迹 Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-30 #8 如果你想更加简单的话, 首先拖一个StatusBar控件,然后再拖一个timer控件, 双击timer,再在里面写下: statusbar1.simpletext:=timetostr(time); 就OK了!
如果你想更加简单的话, 首先拖一个StatusBar控件,然后再拖一个timer控件, 双击timer,再在里面写下: statusbar1.simpletext:=timetostr(time); 就OK了!
F fineboy Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-30 #9 重载TStatusBar的Create()方法,使它能为其他控件的父类;然后。。。嘿嘿 查看(?)ControlStyle 属性