Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Question about Shell()

Posted on 2002-03-19
5
Medium Priority
?
210 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

604 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