Procedure Timer1Timer(sender)
Begin
Statusbar1.panels.items[2].text:=Datatimetostr(Now);
End;
Begin
Statusbar1.panels.items[2].text:=Datatimetostr(Now);
End;
解决方案 »
- 恢复窗体最大化之前的状态,发送 什么消息??
- 300¥
- 用CreateOleObject创建的对象是否需要显式地释放?怎样释放?
- 一个有30多个参数的存储过程。(在线)
- 关于套打问题!(急!急!急!)
- 请问如何让delphi2007中的memo控件能显示unicode编码的汉字呢?谢谢啊
- idhttpserver如何接收post过来的文件呢?
- 谁有《delphi 5开发人员指南》的源码
- 急!!!如何在QUERY的ONUPDATEERROR事件中写程序避免更新时出现错误提示!高手帮帮助我吧!
- delphi 如何获取MP3音频文件的时间长度,然后可以从任意一个时间点开始播放到某个时间点
- 从扫描仪导入照片怎么导入
- TStringGrid中用什么方法可以使显示在表格中的数据居中显示?
第一步:在FORM上放一个DELPHI自带的TIMER控件,Button1,button2
7个LABEL.
BUTTON1的点击事件;
begin
timer1.enabled:=True;
end;
BUTTON2的点击事件
begin
timer1.enabled:=false;
定义:
Procedure TForm1.Timer1Timer(Sender:TObject);
Var
datatime:tdateTime;
Year,Month,Day,Hour,Min,Sec,MSec:word;
begin
DateTime:=Now;
DecodeDate(DateTime,Year,Month,Day);
Label1.caption:='Year:'+Inttostr(year);
Label2.caption:='Month:'+Inttostr(Month);
label3.caption:='day:'+Inttostr(day);
Decodetime(Datatime,hour,min,sec,msec);
label4.caption:='Hour:'+Inttostr(hour);
label5.caption:='min:'+Inttostr(min);
Label6.caption:='sec:'+Inttostr(sec);
Leabl7.caption:='Msec:'+Inttostr(MSEC);
END;
date:系统日期
在SysUtils中定义