控件:一个text文本控件、二个命令按纽、一个label和一个Timer.
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Dim fen As Integer, miao As Integer
fen = Val(Text1.Text) \ 60
miao = (Val(Text1.Text) - 60 * fen)
Label1.Visible = True
Label1.Caption = "共使用了" & fen & "分" & miao & "秒"
End Sub
Private Sub Form_Load()
Label1.Visible = False
End Sub
Private Sub Timer1_Timer()
Text1.Text = Text1.Text + 1
End Sub
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息