|
filedialog "Select an MP3 file", "*.mp3", mp3file$ if mp3file$ = "" then end ret$ = mciSendString$("open " + chr$(34) + mp3file$ + chr$(34) + _ " type mpegvideo alias music") ret$ = mciSendString$("play music") if ret$ = "" then print "Playing "; mp3file$ end function mciSendString$(s$) buffer$ = space$(1024)+chr$(0) buflen = len(buffer$) calldll #winmm, "mciSendStringA", s$ as ptr, buffer$ as ptr,_ buflen as long, 0 as long, ret as short if ret then mciSendString$ = "error ";ret else mciSendString$ = trim$(buffer$) end if end function
|