By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

help with mciSendString song duration

P: n/a
I have this code in a dragdrop routine for a listview to get the
duration of an mp3, where fPath is the path to the file that gets

Dim fname As String = Chr(34) + Trim(fPath) + Chr(34)
mciSendString("open " & fname & " alias song", 0, 0, 0)
Dim totalTime As String = Space(128)
mciSendString("status song length", totalTime, 128, 0&)
.Duration = totalTime
mciSendString("close " & fname & " alias song", 0, 0, 0)
totalTime = Nothing
the code seems to work for the first mp3 that gets dropped, but each
file after that returns the same duration of the first. Can someone
explain what is not right in that code, and how to change it so that it

Mar 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.