How To Get The Movie Duration Using VB.Net
Function GetMovieDuration(ByVal MovieFullPath As String) As String
If File.Exists(MovieFullPath) Then
Dim objShell As Object = CreateObject(“Shell.Application”)
Dim objFolder As Object = _
objShell.Namespace(Path.GetDirectoryName(MovieFullPath))
For Each strFileName In objFolder.Items
If strFileName.Name = Path.GetFileName(MovieFullPath) Then
Return objFolder.GetDetailsOf(strFileName, 27).ToString
Exit For
Exit Function
End If
Next
Return “0”
Else
Return “0”
End If
End Function
‘———-
source: Link
Comments