找回密码
 注册
搜索
查看: 640|回复: 1

计时小软件,免费,带源码

[复制链接]
发表于 2007-8-9 11:27:24 | 显示全部楼层 |阅读模式
【文件名】:0789@52RD_秒表.rar
【格 式】:rar
【大 小】:6K
【简 介】:分别计时,含打印输出功能
【目 录】:
[UseMoney=0]

[/UseMoney]
前些天闲来无事写了一个小小计时软件,今略作小小修改,
源码如下:
Option Explicit
Dim ss%, mm%, hh%, ww%, na%, j%, i%
Dim time_rec As String
Private Sub Command1_Click()
Command4.Enabled = True
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Command5.Enabled = True
Timer1.Enabled = False
Call sequ
time_rec = Str(na) + "." + Text1.Text + "       " + Format(Time, "hh:mm:ss")
List1.AddItem time_rec
End Sub
Private Sub Command3_Click()
Command5.Enabled = True
Call sequ
time_rec = Str(na) + "." + Text1.Text + "       " + Format(Time, "hh:mm:ss")
List1.AddItem time_rec
End Sub
Private Sub Command4_Click()
Timer1.Enabled = False
ww = 0: ss = 0: mm = 0: hh = 0
Text1 = Format$(hh, "00") + ":" + Format$(mm, "00") + ":" + Format$(ss, "00") + ":" + Format$(ww, "00")
End Sub
Private Sub Command5_Click()
List1.Clear
Command4.Enabled = False
Command5.Enabled = False
Call sequ
End Sub
Private Sub Command6_Click()
End
End Sub
Private Sub Command7_Click()
Call List1_Click
End Sub

Private Sub Form_Activate()
Label2.Caption = Format(Time, "hh:mm:ss") + "   " + Format(Date, "yyyy/mm/dd")
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Text1 = Format$(hh, "00") + ":" + Format$(mm, "00") + ":" + Format$(ss, "00") + ":" + Format$(ww, "00")
Command4.Enabled = False
Command5.Enabled = False
End Sub
Private Sub List1_Click()
Dim Header$, K%, i%, y#
Print " Now printing...." 'display print mesage
Header = " Time Recorder " 'set page-start string
Printer.FontName = "黑体": Printer.FontSize = 10
Printer.Print Header; 'printer page-start
Printer.Print "     " + Format(Date, "yyyy-mm-dd")
Printer.Print
y = Printer.CurrentX + 10 ' set first-location
Printer.Line (0, y)-(Printer.ScaleWidth, y) ' on the title to add under-line
Printer.Print
Printer.Print
For j = 0 To na
Printer.Print List1.List(j)
Next j
Printer.NewPage
Printer.EndDoc
End

End Sub
Private Sub Timer1_Timer()
ww = ww + 1
If ww >= 100 Then
ss = ss + 1
ww = 0
If ss >= 60 Then
mm = mm + 1
ss = 0
If mm >= 60 Then
hh = hh + 1
mm = 0
End If
End If
End If
Text1 = Format$(hh, "00") + ":" + Format$(mm, "00") + ":" + Format$(ss, "00") + ":" + Format$(ww, "00")
End Sub
Public Sub sequ()
Static sequence
sequence = sequence + 1
na = sequence
If Command5.Enabled = False Then
sequence = 0
End If
End Sub
Private Sub Timer2_Timer()
Call Form_Activate
End Sub

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2007-8-10 18:43:35 | 显示全部楼层
牛人啊。
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-30 17:49 , Processed in 0.048130 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表