Function PlaySoundFile *!* This is the primary Windows API function that is used to *!* send MCI commands DECLARE INTEGER mciSendString ; IN WinMM.DLL ; STRING cMCIString,; STRING @cRetString,; INTEGER nRetLength,; INTEGER hInstance *!* This function allows us to retrieve the last MCI error that occured DECLARE INTEGER mciGetErrorString ; IN WINMM.DLL ; INTEGER nErrorno, ; STRING @cBuffer, ; INTEGER nBufSize *!* When MCI plays a video, it creates its own Window. By using *!* this Windows API function we can position this Window to be *!* in the same position as our Player rectangle on the form DECLARE INTEGER SetWindowPos ; IN User32 ; INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, INTEGER cCmd = ('OPEN "' + tcSoundFile + '" alias FoxMedia WAIT') THIS.doMCI(cCmd) *!* First need to see if the media is at the end *!* by comparing the total length with the current position nMediaLength = VAL(THIS.doMCI("STATUS FoxMedia length")) nMediaPosition = VAL(THIS.doMCI("STATUS FoxMedia position")) IF nMediaPosition >= nMediaLength THEN *!* The media is at the end, so we need to seek back to the start *!* of the clip before playing THIS.doMCI("SEEK FoxMedia to start WAIT") ENDIF *!* Now we can play the media THIS.doMCI("PLAY FoxMedia")>Does somebody know how to play a MP3 or WAV or any other sound file in VFP8?