Solved

Question about Shell()

Posted on 2002-03-19
5
155 Views
Last Modified: 2010-05-02
In Visual Basic 6.0, I want to use the Shell command in a special way. I was to have Shell to open a file in windows media player, and make it fullscreen. then when that file is completly finished...I want it to play the next. *.mpg, *.avi (any video format). I also want to do it with music files like *.wav and *.mp3. Can someone give me the code?
0
Comment
Question by:Linky
  • 3
5 Comments
 
LVL 18

Accepted Solution

by:
Crash2100 earned 50 total points
Comment Utility
Command Line Options Available for Windows Media Player
http://support.microsoft.com/directory/article.asp?ID=Q241422

Try this, also take a look at the Windows Media Player control listed in the VB components selection.

Shell "C:\program files\windows media player\mplayer2.exe " & _
    "/play /fullscreen /close " & Chr(34) & _
    "C:\myfile.avi" & Chr(34)
0
 
LVL 3

Expert Comment

by:nzjonboy
Comment Utility
I'm not sure you can use the shell function to get that much control of the app settings, you should try creating a playlist and then opening that by creating a mediaplayer object. this way you will get full control of mediaplayer and its settings.

nzjonboy
0
 
LVL 18

Expert Comment

by:Crash2100
Comment Utility
Sorry I forgot that you wanted it to wait until the application exits, this code will shell an app and wait till it exits.  You could use this in place of the shell statement.

Shell out to a 32-bit application and wait until task completes
http://www.visualbasiccode.com/asp/showsn.asp?theID=33
0
 
LVL 2

Author Comment

by:Linky
Comment Utility
Crash2100, you got it! Thanks a lot, that really helped.
0
 
LVL 18

Expert Comment

by:Crash2100
Comment Utility
Glad to hear it worked!  Thanks for the points!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now