Solved

Question about Shell()

Posted on 2002-03-19
5
190 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
ID: 6881454
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
ID: 6881479
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
ID: 6881507
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
ID: 6881630
Crash2100, you got it! Thanks a lot, that really helped.
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 6881666
Glad to hear it worked!  Thanks for the points!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 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