locked
axmediaplayer1 - show label at frame - or time RRS feed

  • Question

  • Hi,

    I have a windows media player on my form - works fine.

    I'd like to have a label show about 2 - 3 seconds into my wmv file playing.

    How do I do that?

    I have this but it's not working at all:

       If AxWindowsMediaPlayer1.Ctlcontrols.currentPositionString > "00:03" Then
                    MsgBox("hi")
                End If


    qeqw

    Wednesday, December 19, 2012 3:05 PM

All replies

  • Hi,

    I have a windows media player on my form - works fine.

    I'd like to have a label show about 2 - 3 seconds into my wmv file playing.

    How do I do that?

    I have this but it's not working at all:

       If AxWindowsMediaPlayer1.Ctlcontrols.currentPositionString > "00:03" Then
                    MsgBox("hi")
                End If


    qeqw

    I think you are comparing data incorrectly. What is the data type of AxWindowsMediaPlayer1.Ctlcontrols.currentPositionString? It appears to be a string, in which case the compare will generally fail. Have a look at converting to timespan, perhaps?

    An alternative is to use a timer.


    Harry
    Wednesday, December 19, 2012 9:09 PM