Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleUse a FilgraphManager to play a WAV file
DescriptionThis example shows how to use a FilgraphManager to play a WAV file in Visual Basic 6.
KeywordsFilgraphManager, WAV, audio, media
CategoriesMultimedia
 
Thanks to Gamal Azim.

This example plays a .wav file. It includes a reference to the ActiveMovie control type library. The most interesting code is the start subroutine, which creates a FilgraphManager and uses its RenderFile method to play the .wav file.

 
Sub start()
    If Dir(cd1.FileName) = "" Or cd1.FileName = "" Then
        strSound = App.Path + "\Lacool.wav"
        Set MediaControl = New FilgraphManager
        MediaControl.RenderFile strSound
        MediaControl.Run
    Else
        strSound = cd1.FileName
        Set MediaControl = New FilgraphManager
        MediaControl.RenderFile strSound
        MediaControl.Run
    End If
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated