PDA

View Full Version : visual basic and sounds



littlebottom
2012-02-06, 04:21 PM
Hey, i cant seem to make a program play a sound file, an mp3 to be precise, its only a second long and i want to repeat it until otherwise noted, ive got the timer etc working, i just cant get it to play the mp3 sound effect.

basically i want it to go

"sound"
"wait a second"
"play sound again"
"repeat until prompted to stop"

so as an additional question, will it play the mp3 and stop at the end of the file, or do i also have to actively end it before asking it to play it again?

factotum
2012-02-06, 04:30 PM
What version of VB are we talking? I found this tutorial for VB.NET:

http://www.codeproject.com/Articles/12848/Play-sound-in-VB-NET

littlebottom
2012-02-06, 06:22 PM
Visual basic 2010 express apparently, if that makes much difference.

i just tried that above tutorial, well, i tried to make it work for my purposes and i didnt manage it:smallannoyed:

isnt there some simple line of code that just goes "directory to file.[name of file].play" or something:smallconfused: