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
 
 
 
 
 
 
TitlePlay a MIDI audio file by using DirectX in VB .NET
DescriptionThis example shows how to play a MIDI audio file by using DirectX in VB .NET. It uses an Audio object.
KeywordsMIDI, DirectX, Audio, multimedia, VB .NET
CategoriesMultimedia, VB.NET
 
First add a reference to the Microsoft.DirectX.AudioVideoPlayback library.

To play an audio file, create a new Audio object, passing its constructor the name of the audio file. Then call the object's Play method.

 
Imports Microsoft.DirectX.AudioVideoPlayback

Private Sub btnPlay_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnPlay.Click
    Dim audio_player As New Audio(txtFile.Text)
    audio_player.Play()
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated