Solved

Question about Shell()

Posted on 2002-03-19
5
170 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 add a minute to the date time value 8 64
DIR issue 7 51
MsgBox 2 48
How to measure sizes and angles in scanned images ? 3 55
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

863 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

19 Experts available now in Live!

Get 1:1 Help Now