Here I've coded based on MSDN DirectMusic for Dx8 to be used in VB.NET but when I test it out in school today, I found out that the school doesn't support Dx8 with Win2k, and only supports Dx7. So I hoping any kind soul could help me change this and that so that it'll work for Dx7.
Code:
   Public Sub InitializeDirectMusic()
       dml8 = dx8.DirectMusicLoaderCreate
       dmp8 = dx8.DirectMusicPerformanceCreate
       dmp8.InitAudio(Me.Handle.ToInt32, DxVBLibA.CONST_DMUS_AUDIO.DMUS_AUDIOF_ALL, Nothing, Nothing, DxVBLibA.CONST_DMUSIC_STANDARD_AUDIO_PATH.DMUS_APATH_SHARED_STEREOPLUSREVERB, 64)
   End Sub

   Public Sub PlayMidi(ByVal Filename As String)
       seg8 = dml8.LoadSegment(Application.StartupPath & Filename)
       seg8.Download(dmp8.GetDefaultAudioPath)
       dmp8.PlaySegmentEx(seg8, 0, 0)
   End Sub

   Public Sub StopMidi(ByVal FileName As String)
       seg8 = dml8.LoadSegment(Application.StartupPath & FileName)
       seg8.Unload(dmp8.GetDefaultAudioPath)
       dmp8.StopEx(seg8, 0, 0)
   End Sub
I tired a little but I just can't get the seg8.Download to work, don't know what with .GetDefaultAduioPath which is not avalible with Dx7!