0

Running the code below, the video doesn't repeat, just stops at the end. It used to work:

    dim moviewindow as picturebox
    dim filename as string= Chr(34) & "C:\test.mp4" & Chr(34)

    mciSendString("open " & filename & " type mpegvideo alias myMovie parent " & moviewindow.Handle.ToInt32 & " style child", vbNullString, 0, IntPtr.Zero)
    mciSendString("put myMovie window at 0 0 " & moviewindow.Width & " " & moviewindow.Height, vbNullString, 0, IntPtr.Zero)
    mciSendString("setaudio myMovie volume to 0", vbNullString, 0, IntPtr.Zero)
    mciSendString("play myMovie notify repeat", vbNullString, 0, IntPtr.Zero)

On Windows 10, AMD cards. All graphics drivers up to date. LAV codecs installed.

Any ideas?

stigzler
  • 793
  • 2
  • 12
  • 29
  • When you use pinvoke then you *must* check for errors. If you don't then you cannot find out why "it did not work". Do not ignore the return value of mciSendString. – Hans Passant Jun 01 '17 at 15:36
  • Thanks Hans. I didn't - they were all zeros, but I should have posted these. Transpires it was some issue with my audio drivers. Sorted these and repeat fixed. – stigzler Jun 01 '17 at 22:01

0 Answers0