locked
MS TV VIdeo control (AxMSVidCtl1) repeat Video RRS feed

  • Question

  • i need help

    how do i set the propperty to repeat the Video played in MS TV VIdeo control VB2010.

    thanks..

    Wednesday, August 30, 2017 1:48 PM

Answers

  •  You can achieve this by using the StateChange event of the AxMSVidCtl.  Just monitor it for the State changing to Stop and you can then immediately run (play) the video again.  The example below works for me.  You can try it in a new form project with 1 AxMSVidCtrl,  1 CheckBox,  and 2 Buttons added to the form.

    Imports AxMSVidCtlLib
    
    Public Class Form1
        Private VidFilename As String = "C:\Test\Vids\CC.avi"
        Private UserStopped As Boolean = False
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            AxMSVidCtl1.View(VidFilename.ToString)
        End Sub
    
        Private Sub Button_Play_Click(sender As Object, e As EventArgs) Handles Button_Play.Click
            AxMSVidCtl1.Run()
        End Sub
    
        Private Sub Button_Stop_Click(sender As Object, e As EventArgs) Handles Button_Stop.Click
            UserStopped = True
            AxMSVidCtl1.Stop()
        End Sub
    
        Private Sub AxMSVidCtl1_StateChange(sender As Object, e As _IMSVidCtlEvents_StateChangeEvent) Handles AxMSVidCtl1.StateChange
            If e.currState = MSVidCtlLib.MSVidCtlStateList.STATE_STOP AndAlso Not UserStopped AndAlso CheckBox_LoopVideo.Checked Then
                AxMSVidCtl1.Run()
            End If
        End Sub
    End Class
    


    If you say it can`t be done then i`ll try it

    Wednesday, September 6, 2017 4:35 PM

All replies

  • Hi delufi78,

    I did not find the video to be played repeatedly by setting the properties in MS TV Video control, but axWindowsMediaPlayer has this property.

    axWindowsMediaPlayer1.settings.setMode("loop", True)

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 6, 2017 9:10 AM
  •  You can achieve this by using the StateChange event of the AxMSVidCtl.  Just monitor it for the State changing to Stop and you can then immediately run (play) the video again.  The example below works for me.  You can try it in a new form project with 1 AxMSVidCtrl,  1 CheckBox,  and 2 Buttons added to the form.

    Imports AxMSVidCtlLib
    
    Public Class Form1
        Private VidFilename As String = "C:\Test\Vids\CC.avi"
        Private UserStopped As Boolean = False
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            AxMSVidCtl1.View(VidFilename.ToString)
        End Sub
    
        Private Sub Button_Play_Click(sender As Object, e As EventArgs) Handles Button_Play.Click
            AxMSVidCtl1.Run()
        End Sub
    
        Private Sub Button_Stop_Click(sender As Object, e As EventArgs) Handles Button_Stop.Click
            UserStopped = True
            AxMSVidCtl1.Stop()
        End Sub
    
        Private Sub AxMSVidCtl1_StateChange(sender As Object, e As _IMSVidCtlEvents_StateChangeEvent) Handles AxMSVidCtl1.StateChange
            If e.currState = MSVidCtlLib.MSVidCtlStateList.STATE_STOP AndAlso Not UserStopped AndAlso CheckBox_LoopVideo.Checked Then
                AxMSVidCtl1.Run()
            End If
        End Sub
    End Class
    


    If you say it can`t be done then i`ll try it

    Wednesday, September 6, 2017 4:35 PM
  • Problem get resolved now, Its worked

    Thanks to @Cherry Bu


    • Edited by delufi78 Thursday, September 7, 2017 3:10 PM
    Thursday, September 7, 2017 3:10 PM