thisform.label2.caption=sec(datetime())我在运行VF时候这句出现“此类型数据无效” 我试着运行thisform.label2.caption=TIME()就可以了,
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/11 22:40:21
![thisform.label2.caption=sec(datetime())我在运行VF时候这句出现“此类型数据无效” 我试着运行thisform.label2.caption=TIME()就可以了,](/uploads/image/z/13331354-50-4.jpg?t=thisform.label2.caption%3Dsec%28datetime%28%29%29%E6%88%91%E5%9C%A8%E8%BF%90%E8%A1%8CVF%E6%97%B6%E5%80%99%E8%BF%99%E5%8F%A5%E5%87%BA%E7%8E%B0%E2%80%9C%E6%AD%A4%E7%B1%BB%E5%9E%8B%E6%95%B0%E6%8D%AE%E6%97%A0%E6%95%88%E2%80%9D+%E6%88%91%E8%AF%95%E7%9D%80%E8%BF%90%E8%A1%8Cthisform.label2.caption%3DTIME%28%29%E5%B0%B1%E5%8F%AF%E4%BB%A5%E4%BA%86%2C)
thisform.label2.caption=sec(datetime())我在运行VF时候这句出现“此类型数据无效” 我试着运行thisform.label2.caption=TIME()就可以了,
thisform.label2.caption=sec(datetime())
我在运行VF时候这句出现“此类型数据无效” 我试着运行thisform.label2.caption=TIME()就可以了,
thisform.label2.caption=sec(datetime())我在运行VF时候这句出现“此类型数据无效” 我试着运行thisform.label2.caption=TIME()就可以了,
步骤1、新建一个表单,并有表单上拖放一个计时器timer1,然后将该对象的interval设置为1000,即每隔一秒钟激活一次计时器事件,并将ENABLED属性设置为.T.
2、在表单中添加两个自定义的方法mydrawclock,gettime
3、添加mydrawclock方法代码为:
timeinstring=""
nhour=hour(datetime())
nmin=minute(datetime())
nsec=sec(datetime())
timeinstring=timeinstring+iif(nhour<10,"0"+alltrim(str(nhour)),alltrim(str(nhour)))+":"
timeinstring=timeinstring+iif(nmin<10,"0"+alltrim(str(nmin)),alltrim(str(nmin)))+":"
timeinstring=timeinstring+iif(nsec<10,"0"+alltrim(str(nsec)),alltrim(str(nsec)))
return timeinstring
5、双击timer1对象,在timer事件中添加如下代码:
h=hour(datetime())
m=minute(datetime())
s=sec(datetime())
thisform.mydrawclock(h,m,s)
thisform.caption=thisform.gettime()