Results 1 to 4 of 4

Thread: [RESOLVED] Help to play video in Windows Media Player

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    Resolved [RESOLVED] Help to play video in Windows Media Player

    I am storing the folder and file name in text field Location.Text like
    D:\Movies\Barnyard.avi (No spaces in the name)

    I use the following code to play the movie in Windows Media Player from within my VB6 program

    HTML Code:
     Shell "C:\Program Files\Windows Media Player\wmplayer.exe" & " " & Location.Text & " "
    This works perfectly if there are no spaces in the file name.

    When their are spaces in the movie name like D:\Movies\Dirty Dancing.avi then Media Player give following message: "The selected file has an extension (.) that is not recognised by Windows media Player.

    I suspect it has something to do with the quotations in the code:
    wmplayer.exe" & " " & Location.Text & " "
    but I just can't get it right

    PS when selecting GOM Player to play the movie it play both ways without any problems

  2. #2
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: Help to play video in Windows Media Player

    Surround the filename in quotes:
    Code:
    Shell "C:\Program Files\Windows Media Player\wmplayer.exe" & " """ & Location.Text & """ "

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    Re: Help to play video in Windows Media Player

    Thanks a million.

  4. #4
    New Member ehabneo's Avatar
    Join Date
    Jul 2010
    Location
    EGYPT
    Posts
    1

    Re: [RESOLVED] Help to play video in Windows Media Player

    Thanks

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