Re: Getting meida duration
Re: Getting meida duration
Am I missing something? I copied the code into a new class called 'MCI' and then created a test button that would change a label to the time found.
Code:
Label1.text = MCI.GetMediaLength("C:\Users\UserName\Videos\Video name.avi")
Every time I run this I keep getting the message that the media length can not be retrieved. I have tried this with multiple formats (.wav, .avi, .mp3) However, I did get it to work once, with a 1 second WAVE file. So, am I not calling it right, or could someone maybe better describe the code from http://www.vbforums.com/showpost.php...63&postcount=2? Is this suppose to be able to work with all formats?
As I said, I tried it with several formats with it failing to get the time each try. Thank you again in advance for the help.
Re: Getting meida duration
I mean that shell is better idea
look:
Re: Getting meida duration
Ok, the shell commands look like it might work...except for the fact that for whatever reason, the "Microsoft Shell Controls And Automation" does not exist in the 'COM' list. Any ideas? Is it under a different name in visual studio 2010?
Re: Getting meida duration
I use Visual Studio 2010 and windows 7x64 and it's Microsoft Shell Controls And Automation.