Playing an .AVI File with the MCITEST Example

Last reviewed: June 21, 1995
Article ID: Q98769
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.00 and 3.00

SUMMARY

This article shows how to modify the multimedia sample project MCITEST.MAK to load and play Microsoft Video for Windows files (.AVI files). To apply the information in this article, you must have Video for Windows drivers correctly installed and a valid .AVI file available.

More Information:

  1. Open the project VB\SAMPLES\MCI\MCITEST.MAK.

  2. Select MCITEST.FRM in the Project Window. From the View menu, choose Code. In the Object combo box, select AI_ANIMATION to display the AI_ANIMATION_Click event handler.

  3. Modify the common dialog Filter to display .AVI files:

    change: OpenDlg.CMDialog1.Filter = "Movie File (*.mmm)|*.mmm"

           to:  OpenDlg.CMDialog1.Filter = "Movie File (*.avi)|*.avi"
    

    Modify the DeviceType to access the AVI drivers:

    change: Animate.MMControl1.DeviceType = "MMMovie"

           to:  Animate.MMControl1.DeviceType = "AVIVideo"
    

  4. Select ANIMATE.FRM in the Project Window. From the View menu, choose Code. In the Object combo box, select AI_OPEN to display the AI_OPEN_Click event handler.

  5. Modify the DeviceType to access the AVI drivers. Scroll down by pages to find the location for this change.

    change: Animate.MMControl1.DeviceType = "MMMovie"

           to:  Animate.MMControl1.DeviceType = "AVIVideo"
    

  6. Save the work, and run the application.


Additional reference words: 2.00 3.00 mci control multimedia multi media
KBCategory: kbprg
KBSubcategory: PrgCtrlsCus


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.