sabrehagen
asked on
Set Song/Video position using the Windows Media Player control
Hi EE,
I am using Visual Basic 6 and have a Windows Media Player control on my form. I want to be able to set the position of the current file playing through the code - not by clicking the progress bar. I can get the current position in two formats - raw (1.04356834) and string (03:28) - but I just can't work out how to set the position.
Thank you very much for your help,
Jackson
I am using Visual Basic 6 and have a Windows Media Player control on my form. I want to be able to set the position of the current file playing through the code - not by clicking the progress bar. I can get the current position in two formats - raw (1.04356834) and string (03:28) - but I just can't work out how to set the position.
Thank you very much for your help,
Jackson
This is the code to get the raw position where WMP is the Windows Media Player control:
WMP.controls.currentPosition
This is the code to get the string position where WMP is the Windows Media Player control:
WMP.Controls.currentPositionString
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can parse the string looking for Hr Min Sec and CDbl to get your position.
ASKER
Regrettably, I'm going to accept purquiz's answer, because even though it is right, I made the stupid mistake of only testing half the problem, the WRONG half :P If I hadn't given up, and tried to solve it myself, I'm sure I could have done it.
Thankyou anyway purquiz :)
Jackson
Thankyou anyway purquiz :)
Jackson
ASKER
To finish the question, how do you convert "03:21" to a double?