It was so much easier in the good old DOS Days... You had direct control of the hardware and didn't have to fight with the Hardware Abstraction Layer...
In <Project> <Components> you can add the "Windows Media Player" Control and this will give you control of MP3; WMA; and .WAV (Maybe a few others).
This is the code from a desktop Alarm Clock I put together
Private Sub Do_Alarm(aFile As String, aPrompt As String)
If Not Muted Then
wmp.settings.volume = 100
wmp.URL = aFile
If Not Hold_Off Then Prompt.Show
Prompt.Prompt.Caption = " "
Prompt.Prompt.Caption = aPrompt
You can also use the Media Control Interface by Declaring it in a Module
Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
hwndCallback As Long) As Long
However, the MCI interface will not work on some "Locked Down" Computers...
Once you start the sound the following code should stop it
Private Sub mmnuStop_Click()