DECLARE FUNCTION mciExecute LIB "winmm.dll" ALIAS "mciExecute" (BYVAL lpstrCommand AS STRING) AS LONG
DECLARE SUB mOpen(File AS STRING)
DECLARE SUB mPlay
DECLARE SUB mPause
DECLARE SUB mStop
DIM CurrentMusicFile AS STRING
SUB mOpen(File AS STRING)
mciExecute("Open "+File)
CurrentMusicFile = File
END SUB
SUB mPlay
mciExecute("Play "+CurrentMusicFile)
END SUB
SUB mPause
mciExecute("Pause "+CurrentMusicFile)
END SUB
SUB mStop
mciExecute("Close "+CurrentMusicFile)
END SUB
|