Function GetDuration(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, 21).ToString
Exit For
Exit Function
End If
Next
Return ""
Else
Return ""
End If
End Function