I have a program, for some reason when i set the value to progressbar 100 and the progressbar1.length * 100 with my mp3 player it will not progress through the timer set. here is the code... maybe i am doing something wrong.
Code:
Private Sub cmdClose_Click()
mmcAudio.Command = "Close"
End Sub
Private Sub cmdPlay_Click()
With cd1
.Filter = "MP3 Files(*mp3)|*.mp3"
.ShowOpen
cmdPlay.Enabled = False
mmcAudio.FileName = cd1.FileName
mmcAudio.Command = "Open"
mmcAudio.Command = "Play"
mmcAudio.Wait = False
Timer1.Enabled = True
End With
End Sub
Private Sub cmdStop_Click()
mmcAudio.Command = "Stop"
End Sub
Private Sub Form_Load()
mmcAudio.Notify = False
mmcAudio.Wait = True
mmcAudio.Shareable = False
mmcAudio.Command = "Close"
'mmcAudio.DeviceType = "Other"
mmcAudio.TimeFormat = mciFormatMsf
End Sub
Private Sub Form_Unload(Cancel As Integer)
mmcAudio.Command = "Close"
End Sub
Private Sub mmcAudio_Done(NotifyCode As Integer)
ProgressBar1.Value = 100
Timer1.Enabled = False
mmcAudio.Command = "Close"
cmdPlay.Enabled = True
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = mmcAudio.Position / _
mmcAudio.Length * 100
End Sub
I can play a Mp3 from this code, but i can't get the progressbar to work right.. thanks
wildturkey
Enter your message below
Sign in or Join us (it's free).