You could use an axWindowsMediaPlayer control to get the length of a video as a Double type value. Then use the TimeSpan class to get a String formatted as "HH:MM:SS". You could modify the example to format it to include milliseconds too if needed.
I am not sure what the "FF" stands for in your post so, i`m not sure what to tell you for that.
Also, you will want to test any video formats that you want to use this for. The axWindowsMediaPlayer control may not support some video formats.
- Public Class Form1
-
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
-
AxWindowsMediaPlayer1.URL = "C:\test\vids\cc.avi"
-
End Sub
-
-
Private Sub AxWindowsMediaPlayer1_StatusChange(sender As Object, e As EventArgs) Handles AxWindowsMediaPlayer1.StatusChange
-
If AxWindowsMediaPlayer1.status.ToLower.Contains("playing") Then
-
AxWindowsMediaPlayer1.Ctlcontrols.stop()
-
Dim ts As TimeSpan = TimeSpan.FromSeconds(AxWindowsMediaPlayer1.currentMedia.duration)
-
Me.Text = If(ts.ToString.Contains("."), ts.ToString.Remove(ts.ToString.IndexOf(".")), ts.ToString).ToString
-
End If
-
End Sub
-
End Class
-