Windows 10 mp3 in visual basic

Kevin Hu

Well-Known Member
Hi, I started a project with visual basic with microsoft visual studio. I want to add audio to my program and play it as background.

I searched the Internet and learned how to add .wav to my project. But .wav format is uncompressed audio, therefore it took a lot of space. If the mp3 file take about 1-3MB, then the converted file of wav would be around 20-40MB, that's a giant file.

I tried adding a mp3 file into visual basic but there's an error "InvalidOperationException was unhandled"

Is there a way to add .mp3 and play it as background in visual basic? If this option is not available, is it possible to add .mp3 file in other programming languages such as C#, C++