|
-
Feb 5th, 2000, 03:37 PM
#1
Thread Starter
New Member
I'm using the Windows Media Player to play audio files (mainly mp3s), and have it hidden (so I am unable to see the time remaining in one of the bars), and was wanting to have a label that showed how much time was remaining in the song. I've been using the MediaPlayer.SelectionEnd and MediaPlayer.CurrentPosition, along with a timer (interval at 1000), to try and display the time remaining, but i can't come close to getting it to work properly (with the label formatted like: "00:00"). All help is greatly apprecieated.
-
Feb 5th, 2000, 04:35 PM
#2
Try:
Code:
Private Sub Command1_Click()
With MediaPlayer1
.FileName = "C:\Windows\Media\The Microsoft Sound.wav"
.Play
While .PlayState = mpPlaying
Caption = .CurrentPosition
DoEvents
Wend
End With
End Sub
Alternatively use the Microsoft Multimedia Control:
Code:
Private Sub Command1_Click()
With MMControl1
.Visible = False
.UpdateInterval = 100
.TimeFormat = mciFormatMilliseconds
.FileName = "C:\Windows\Media\The Microsoft Sound.wav"
.Command = "Open"
.Command = "Play"
End With
End Sub
Private Sub MMControl1_StatusUpdate()
Caption = MMControl1.Position / 1000
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Feb 6th, 2000, 03:43 AM
#3
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|