|
-
Jul 11th, 2010, 01:30 PM
#1
Thread Starter
Member
[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
-
Jul 11th, 2010, 06:01 PM
#2
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 & """ "
Software I use and highly recommend: Opera, Miranda IM, Peerblock, Winamp, Unlocker Assistant, JoyToKey, Virtual CloneDrive, Secunia PSI, ExplorerXP, GOM Player, Real Alternative, Quicktime Alternative,Sumatra PDF, and non-freeware: Photoshop and VB6( ).
My codebank: AllRGB, Rounded Rectangle(math), Binary Server, Buddy Paint, LoadPictureGDI+, System GUID/Volume Serial, HexToAsc, List all processes and their paths, quasiString matching
Strings(search, extraction, retrieval etc): Retrieve BBCode Link from HTML, RemoveBetween ()'s, strFindBetween(str1,str2), Insert text in HTML, HTML - GetSpanByID
-
Jul 12th, 2010, 07:49 AM
#3
Thread Starter
Member
Re: Help to play video in Windows Media Player
-
Jul 12th, 2010, 08:04 AM
#4
New Member
Re: [RESOLVED] Help to play video in Windows Media Player
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|