?
Solved

Question about Shell()

Posted on 2002-03-19
5
Medium Priority
?
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 18

Accepted Solution

by:
Crash2100 earned 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…
Suggested Courses

764 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