您的位置:程序门 -> vb -> 基础类



求助一个关于计时的问题!急!急!急!


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求助一个关于计时的问题!急!急!急!
发表于:2007-01-19 09:26:56 楼主
点击botton1记录当前时间点击botton2记录终点时间讲差值记录在textbox中!如何实现!
发表于:2007-01-19 09:36:421楼 得分:0
option   explicit

private   m_time     as   single

private   sub   command1_click()
        m_time   =   timer()
end   sub

private   sub   command2_click()
        text1.text   =   timer()   -   m_time
end   sub
发表于:2007-01-19 09:43:342楼 得分:0
option   explicit


private   m_time     as   date

private   sub   command1_click()
        m_time   =   time()
end   sub

private   sub   command2_click()
        text1.text   =   datediff( "s ",   m_time,   time)   &   "秒 "
end   sub
发表于:2007-01-19 10:34:383楼 得分:0
同意楼上。
发表于:2007-01-19 16:00:294楼 得分:0
谢了!会做了!还有个问题要问呢!怎么可以讲文字信息和图片保存在同一个文件中啊!commondialog1.filter   =   "文档文件(*.txt) ¦*.txt ¦所有文件(*.*) ¦*.* "   '司机的基本信息录入到专用u盘中
commondialog1.showsave
open   commondialog1.filename   for   output   as   #1
print   #1,   "车次                 : ";   textcarno(0).text
print   #1,   "始发站             : ";   textstartstop(1).text
print   #1,   "终点站             : ";   textendstop(2).text
print   #1,   "时间                 : ";   texttime(3).text
print   #1,   "车号                 : ";   textcarnumber(4).text
'print   #1,   "司机照片         : ";   imagecarmanpic.picture
print   #1,   "限速最大值     : ";   textlimitspeed(5).text
print   #1,   "司机工作时间: ";   textcarmantime(6).text
'savepicture   piccarman.picture,   (commondialog1.filename)
这种方法告诉我是无效文件!


快速检索

最新资讯
热门点击