关于播放器时间显示问题
自己变了个播放器 但是时间显示有问题 暂停或者歌曲结束了 时间一直不停 该怎么解决 请高手帮个忙Dim sec As Integer
Dim isplay As Boolean
Private Sub Command1_Click()
CommonDialog1.DialogTitle = "选择媒体文件"
CommonDialog1.Filter = "所有格式‘"
CommonDialog1.FileName = ""
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then Exit Sub
List1.AddItem CommonDialog1.FileName
End Sub
Private Sub Form_Load()
isplay = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.FileName = ""
= "close"
End Sub
Private Sub List1_DblClick()
MMControl1.FileName = List1.Text
= "close"
= "open"
= "play"
Label2.Caption = MMControl1.FileName
isplay = True
End Sub
Private Sub MMControl1_StatusUpdate()
sec = sec + 1
Refresh
If sec < 10 Then
Label1.Caption = "0" & "0" & ":" & "0" & Str(sec)
ElseIf sec >= 10 And sec < 60 Then
Label1.Caption = "0" & "0" & ":" & Str(sec)
ElseIf sec >= 60 And (sec Mod 60) < 10 Then
Label1.Caption = "0" & Str(Int(sec / 60)) & ":" & "0" & Str(sec Mod 60)
ElseIf sec >= 60 And (sec Mod 60) >= 10 Then
Label1.Caption = "0" & Str(Int(sec / 60)) & ":" & Str(sec Mod 60)
End If
End Sub