| | |
How do I play a .wav file from Resources?
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
![]() |
•
•
Join Date: Mar 2006
Posts: 23
Reputation:
Solved Threads: 0
Visual Basic 2005 Express Edition:
This works, but, I need to get the .wav file from Resources:
My.Computer.Audio.Play("C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\OrthoLabRx\OrthoLabRx\Resources\PodVwBy.wav")
I placed the .wav file in Resources, but, I can't seem to access it from there.
This does not work:
My.Computer.Audio.Play(My.Resources.PodVwBy)
It says "value of type 'System.IO.UnmangedMemoryStream' cannot be converted to 'String'.
This worked, but, instead of a click, it played a grinding noise:
Dim sndPing As New SoundPlayer(My.Resources.PodVwBy)
sndPing.Play()
My.Computer.Audio.Play(My.Resources.PodVwBy)
This works, but, I need to get the .wav file from Resources:
My.Computer.Audio.Play("C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\OrthoLabRx\OrthoLabRx\Resources\PodVwBy.wav")
I placed the .wav file in Resources, but, I can't seem to access it from there.
This does not work:
My.Computer.Audio.Play(My.Resources.PodVwBy)
It says "value of type 'System.IO.UnmangedMemoryStream' cannot be converted to 'String'.
This worked, but, instead of a click, it played a grinding noise:
Dim sndPing As New SoundPlayer(My.Resources.PodVwBy)
sndPing.Play()
My.Computer.Audio.Play(My.Resources.PodVwBy)
![]() |
Similar Threads
- help executing a .wav file with php code (PHP)
- Play a .wav file (Java)
- can't play wav sound... (C++)
- Is there anyway to add wav file or any other music file in C programming? (C++)
- wav file problem (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: Datasets and SQLServer keys
- Next Thread: Append Node to existiing XML file Using Vb.net
| Thread Tools | Search this Thread |
"crystal .net .net2005 .net2008 30minutes 2005 2008 access account arithmetic array basic button buttons center check code component connectionstring convert crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist excel fade file-dialog filter firewall folder ftp generatetags hardcopy image images input insert intel math monitor navigate net networking opacity output panel passingparameters peertopeervideostreaming picturebox picturebox1 port printing problem problemwithinstallation project reports" savedialog searchvb.net select shutdown string survey tcp temperature text textbox timer timespan toolbox trim updown user useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





