Im having problems getting MIDIs to play. However my wavs play fine. Here is my code
------------------------------------------------------------------------------
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Long
Const SND_SYNC As Integer = &H0
Const SND_ASYNC As Integer = &H1
Const SND_NODEFAULT As Integer = &H2
Const SND_LOOP As Integer = &H8
Const SND_NOSTOP As Integer = &H10
Dim SoundName As String, wFlags As Integer, x As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SoundName = "C:\Gamesound2.wav"
wFlags = SND_ASYNC Or SND_NODEFAULT Or SND_LOOP
x = sndPlaySound(SoundName, wFlags)
----------------------------------------------------------------------------------
I typed the midi as the extension for my midi files but it still doesnt work. Any help would be much appreciated. Thanx
------------------------------------------------------------------------------
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Long
Const SND_SYNC As Integer = &H0
Const SND_ASYNC As Integer = &H1
Const SND_NODEFAULT As Integer = &H2
Const SND_LOOP As Integer = &H8
Const SND_NOSTOP As Integer = &H10
Dim SoundName As String, wFlags As Integer, x As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SoundName = "C:\Gamesound2.wav"
wFlags = SND_ASYNC Or SND_NODEFAULT Or SND_LOOP
x = sndPlaySound(SoundName, wFlags)
----------------------------------------------------------------------------------
I typed the midi as the extension for my midi files but it still doesnt work. Any help would be much appreciated. Thanx