After getting back to this project I have ignored for a few months, I have been trying to use mci SendString to play an mp3 file as background music. I declare the function in the usual manner, and then try to use "play", "stop" and "close" to start playback, but with no success. The program runs in debug mode with no errors, but the music simply does not play.

Using VB2015, I declare the function in Module1 as public, and other vars to manipulate stuff are public as well. I thought at first it was a path problem (I set up a var to concatenate Application.StartupPath with a subfolder) but even trying to play a file right from "C:\temp" does not work.

Does anyone have any copy/paste code that would work for this? Maybe I am missing something specific to VB2015? Or doing something else wrong? I cannot figure out what.

The music is not supposed to play until the initial form has been popped down, and the initial play code is in the load event of Form2. It is supposed to be stopped by click events by buttons and/or labels on other succeeding forms that may or may not be loaded. I start the whole app from Sub Main, which loads Form1, and then when the player clicks a button to pop up Form2, that is when the music pays.

I can't use PlaySound as this is used to play other sounds when buttons/labels are clicked or moused over.

Thanks in advance for any useful advice.