Results 1 to 4 of 4

Thread: avi

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    avi

    Hi,
    to get the .avi to work there is only one problem right now and wonder if you can see what it is.

    In this button event as follows the error is reported as:
    pause is not a member of system.windows.forms.control.controlcollection
    the same error is reported for play and stop

    this is the code
    Thanks

    Private Sub btnPlayPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlayPause.Click
    Select Case player.playState

    Case WMPPlayState.wmppsPlaying
    player.Controls.pause()

    Case WMPPlayState.wmppsPaused
    player.Controls.play()

    Case WMPPlayState.wmppsStopped
    player.Controls.play()

    End Select
    End Sub

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Maybe it has another enums .What control did you use btw? Anyways , here's another way to play avi , mpeg , Divx http://www.programmersheaven.com/zone1/cat372/20566.htm

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678
    Using the windows media player.
    Thanks

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    What are player and WMPPlayState variables ?

    Would something like this work !!
    VB Code:
    1. Dim WMPPlayState As New WMPLib.WindowsMediaPlayer
    2.  
    3.         Select Case player.playState
    4.  
    5.             Case WMPLib.WMPPlayState.wmppsPlaying
    6.                 WMPPlayState.controls.pause()
    7.  
    8.             Case WMPLib.WMPPlayState.wmppsPaused
    9.                 WMPPlayState.controls.pause()
    10.  
    11.             Case WMPLib.WMPPlayState.wmppsStopped
    12.                 WMPPlayState.controls.pause()
    13.  
    14. End Select

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width