>*!* Make sure that there is a media file loaded >cCmd = ("STATUS FoxMedia READY") >IF THISFORM.doMCI(cCmd) = "true" THEN > > *!* Need to get the total length of the clip and the current position > nMediaLength = VAL(THISFORM.doMCI("STATUS FoxMedia length")) > nMediaPosition = VAL(THISFORM.doMCI("STATUS FoxMedia position")) > > > *- Play again > IF nMediaLength = nMediaPosition > thisForm.cmdPlay.Click() > ENDIF > *- > > *!* Since the gauge control only allows a MAX setting up to 32,000 > *!* we need to proportionally reduce the length and position values > *!* to be below 32000. >* DO WHILE !BETWEEN(nMediaLength,0,32000) >* nMediaLength = nMediaLength/2 >* nMediaPosition = nMediaPosition/2 >* ENDDO > *!* Now we can set the proper gauge properties. > THISFORM.olePosition.Max = nMediaLength > THISFORM.olePosition.value = nMediaPosition >ENDIF >>P.S.: If you want distinct music, you can to fill a DBF with other musics and set the control with next music in each time.