How to get music to play in Delphi 7?
I need to get music to play in the background in the start of the program in the OnFormActivate event for my program. I have the song I want to use but I dont know what command Delphi needs to use in order to start playing that song. Thanks for you help guys :) Use the TMediaPlayer component, it's on the System tab of the component palette. procedure TForm1.FormActivate(Sender: TObject); begin MediaPlayer1.FileName := '<fill in>.mp3'; MediaPlayer1.Open; MediaPlayer1.Play; end; Set the Visible property to False. Edit in response to OP's comment: To repeat the song, you can use the TTimer