Advertisement

11.03.2007 at 07:23AM PDT, ID: 22936608
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Finish playing AVI file before executing more VB code

Asked by phid in Multimedia Programming, VB Controls, ActiveX

Tags: , , ,

I have been working on this problem for a few days now.  I am writing a game that will use AVI files only for visual effect (screen transitions, etc.)  I just want to display my AVI file, known size with sound in the center of the screen.  I had problems centering with MMControl but the WindowsMediaPlayer Control centers fine.  The problem is that I need to allow the file to play to completion before executing any more code.  I have tried many combinations of DoEvents and Sleep and they halt the video until the sleep period is up.  Do Until loops (changing a variable upon play completion to exit the loop) doesn't ever exit the loop.  I am putting DoEvents in the middle of the loop (and I have tried it with sleep (25) in the loop also, which doesn't work.  I have tried to use a WaitForSingleObject with OpenProcess and CloseHandle code that I found on the internet (which works well but there is no command line option to make Windows Media Player windowless without controls, and I am concerned about version problems on other people's computers).  I am looking for help in one of two things:  Either I need to be able to pause (but not halt) program execution until the AVI is finished playing and then resume at that point in the code... or I need to know how to retrieve a filename for a program to start from the command line [ie: I would write my own Media Player that would just play a borderless, control less AVI file in center screen and then close and use the WaitForSingleObject functions above to play it... but I don't know how to let my program know what filename opened it - if I send Shell("customfileplayer.exe thefilename.avi"), what variable does customfileplayer.exe use to know to play thefilename.avi]?  That's a lot, I know.  Sorry.  The former would of course be preferred... but if all else fails I will use the Shell thing.  Thanks a bunch.Start Free Trial
[+][-]11.03.2007 at 10:09PM PDT, ID: 20209638

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Multimedia Programming, VB Controls, ActiveX
Tags: avi, code, before, vb
Sign Up Now!
Solution Provided By: vb_elmar
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628