getting playtime in minutes/seconds for sound file in windows media player?

  • Thread starter Mad Scientist Jr
  • Start date
M

Mad Scientist Jr

i'm programming windows media player (using cfcom for pocket pc,
vb.net) and
while i can read the duration and current position in the file

Private mediaPlayer1 As Odyssey.WMPCE.MediaPlayer
Text1.text = mediaPlayer1.CurrentPosition.ToString
Text2.text = mediaPlayer1.Duration.ToString

the both of these are of type Double. How can I convert these to
minutes/seconds?

Or does someone have code to read a mp3 / wav / windows media file
header and get the length in minutes/seconds, and then I can convert
with that as a basis?

Also WMP only seems to be seeing Windows media format files when I
open them:

If openFileDialog.ShowDialog() = DialogResult.OK Then
mediaPlayer1.FileName = openFileDialog.FileName

How can I get it to play mp3 and WAV files?

thanks
Post a follow-up to this message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top