another form with music? I am using Windows XP, FMOD 3.7.5, and Visual Basic 6. I was having problems with the music not playing when coming from a form that has music going to another form that has music. The problem does not happen when I go from a form without music to a form with music. Also the music does play on the first form with music, but not on the second.
The code is below:
Public Sub GetMusic(MusicFile As String)
Dim result As Long
Dim handle As Long
result = FSOUND_Init(44100, 32, 0)
handle = FMUSIC_LoadSong(App.Path + "\music\" + MusicFile)
FMUSIC_SetLooping handle, 1
FMUSIC_PlaySong (handle)
End Sub

Public Sub StopTheMusic()
FMUSIC_StopSong handle
FMUSIC_FreeSong handle
End Sub

Help would be greatly appreciated.

Thanks in advance.

EDIT: Nevermind, found my problem, it was elsewhere.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.