
Multimedia Programming with vb.NET
There's no specific .NET class to achieve that but you can do it using
declared functions (P/Invoke) like this (code taken from an earlier thread):
Private Declare Auto Function PlaySound Lib "winmm.dll" _
(ByVal lpszSoundName As String, ByVal hModule As Integer, _
ByVal dwFlags As Integer) As Integer
Private Sub PlayWave()
Dim fileName As String
Const SND_FILENAME As Integer = &H20000
fileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) &
"\MyWave.wav"
PlaySound(fileName, 0, SND_FILENAME)
End Sub
You'll have to do the same for the other multimedia functions.
Hope this helps,
Antoine, Pan, Abel
Microsoft Visual Basic .NET Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
(c) copyright Microsoft Corporation 2002
Quote:
> Has anyone seen any resources for low level play and record of wav files
> using vb.net? I need more control than the ol sndPlaySound routines. I am
> hoping for the waveInOpen, mmioopen, calls, etc...
> Thanks..
> Tommy