+ Reply to Thread
Results 1 to 6 of 6

Help - WINDOWS MÉDIA PLAYER

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    portugal
    MS-Off Ver
    Excel 2010
    Posts
    48

    Help - WINDOWS MÉDIA PLAYER

    Hello all,

    I triyng to do a embed of a video player into excel but i have a problem with the pause button.
    When i try to put Plan2.WindowsMediaPlayer1.controls.pause, the player stop and not pause. Anyone can help?


    Exemple to play
    Please Login or Register  to view this content.
    Last edited by FDibbins; 02-14-2017 at 04:32 PM.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Help - WINDOWS MÉDIA PLAYER

    Looks like you are looking for "pause" instead of "stop" ...


    https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    http://www.fmsinc.com/microsoftacces...ediaPlayer.htm




    http://cuinl.tripod.com/Tips/media1.htm


    Play MP3 Files Using Windows Media Player

    You can use Microsoft Windows Media Player in your VB application to play MP3 files.
    To do that you must have Windows Media Player installed on your computer.

    Preparations

    Add Windows Media Player to your form:
    From VB menu choose Project->Components... then mark the Windows Media Player check box and press OK. Now drag the Windows Media Player Control to your form.

    If you want that Windows Media Player will be invisible, set its Visible property to False.

    Add 3 Command Buttons to your form.
    Press the first to play the MP3 file, press the second to stop it, and press the third to Pause/Resume.

    Form Code
    Private Sub Command1_Click()
    ' replace the "D:\MP3\MyFile.mp3" below with the Mp3 file
    ' you want to play
    MediaPlayer1.Open "D:\MP3\MyFile.mp3"
    End Sub

    Private Sub Command2_Click()
    MediaPlayer1.Stop
    End Sub

    Private Sub Command3_Click()
    ' if PlayState is 2: the file is currently playing.
    ' if PlayState is 1: the file is in pause mode.
    If MediaPlayer1.PlayState = 2 Then
    MediaPlayer1.Pause
    Else
    MediaPlayer1.Play
    End If
    End Sub


  3. #3
    Registered User
    Join Date
    07-14-2013
    Location
    portugal
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Help - WINDOWS MÉDIA PLAYER

    Hello,

    thanks for your help but unfortunaly dont works.

    When i click on the "pause" button the player stop and when i click on start it's start from the bigining. Dont do "pause".

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Help - WINDOWS MÉDIA PLAYER

    Results from this internet search :

    Info on PAUSE

    https://msdn.microsoft.com/en-us/library/ms909967.aspx


    Most all commands for player :

    https://msdn.microsoft.com/en-us/library/ms930695.aspx



    This link is in French but if you use Google Chrome (and maybe some other browsers) you can translate the contents and read immediately.
    Looks like a handbook on the media player :

    http://silkyroad.developpez.com/VBA/WindowsMediaPlayer/


    The key word is still PAUSE but it seems to have another way of using it in code.

  5. #5
    Registered User
    Join Date
    07-14-2013
    Location
    portugal
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Help - WINDOWS MÉDIA PLAYER

    Works thanks for the help,

    In the site i found the information.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Help - WINDOWS MÉDIA PLAYER

    Great ! Best wishes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Closing Windows Media Player from Excel?
    By BoSonic in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2018, 04:24 PM
  2. [SOLVED] activex windows media player
    By zaky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2013, 02:00 AM
  3. [SOLVED] Windows Media Player
    By zaky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2013, 03:38 PM
  4. [SOLVED] Hide Windows Media Player after Macro ends
    By bruce2161 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-24-2012, 11:01 PM
  5. Disable windows media player autoplay
    By spursrule68 in forum Excel General
    Replies: 5
    Last Post: 07-02-2012, 11:35 AM
  6. [SOLVED] Media Player versus Windows Media Player
    By teepee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2005, 02:05 PM
  7. Media Player versus Windows Media Player
    By teepee in forum Excel General
    Replies: 1
    Last Post: 10-13-2005, 10:05 PM
  8. [SOLVED] Media Player versus Windows Media Player
    By teepee in forum Excel General
    Replies: 1
    Last Post: 10-13-2005, 10:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1