Microsoft KB Archive/182983

= SAMPLE: PLAYWAVE.EXE Demonstrates How To Play a Sound File =

Article ID: 182983

Article Last Modified on 8/9/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q182983



SUMMARY
PLAYWAVE.EXE is a self-extracting compressed file that demonstrates how to play uncompressed sound files in your Visual Basic program. The sample also displays the wave data graphically. The project also demonstrates how to use some of the multimedia API functions.



MORE INFORMATION
The following files are available for download from the Microsoft Download Center:

Playwave.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

When you run the self-extracting executable file, the following files are expanded into the Wave Audio Sample directory:


 * Form1.frm (5Kb)
 * Form2.frm (4Kb)
 * Module1.bas (9Kb)
 * PlayWave.vbp (1Kb)
 * PlayWave.vbw (1Kb)
 * Readme.txt - Contains some of the same information as this article.

To Run the Sample Project

 * 1) Open the project in Visual Basic.
 * 2) On the Run menu, click Start or press the F5 key to start the program.
 * 3) From the Main Form, click File to open a common dialog control. Select an uncompressed sound file. The sound file data appears in the WaveForm Picture Form.
 * 4) To play the file, click Play on the Main form. To play the file from a different starting or ending point, use the scroll bars to set the start or end points and then click play.

NOTE: The sound file is loaded into memory rather than being read from disk. Large sound files can use a significant amount of memory.

