Hi, I am looking to play a wave file in visual basic. I would like it to play from the resource file. I have added the wave file but how do I get it to play? I do have this code.
Expand|Select|Wrap|Line Numbers
Dim Sound As New System.Media.SoundPlayer()
Sound.SoundLocation = “your path to the .wav file” ‘ex.: c:\mysound.wav
Hi, I am looking to play a wave file in visual basic. I would like it to play from the resource file. I have added the wave file but how do I get it to play?
Can you explain what you mean by "the resource file", to make sure we're all on the same "wavelength"? The code you posted looks as though it's intended to play directly from the WAV file, not from a resource file.
Can you explain what you mean by "the resource file", to make sure we're all on the same "wavelength"? The code you posted looks as though it's intended to play directly from the WAV file, not from a resource file.
I understand this but the resource file that is in VB is were I would like to play my sound from. The code I posted is for a file name but I want one that will play a sound in the resource file.
I understand this but the resource file that is in VB is were I would like to play my sound from. The code I posted is for a file name but I want one that will play a sound in the resource file.
In that case, I think you had better tell us what version of VB you're using.