Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to Play wave file in vb2005

Hi all,
I have encouter difficulty in playing wavefile in my application vb2005.Any good way to solve it.
Error is (computer is not a member of "My") ??
Any help from anyone here is greatly appreciated. I really really need help thank you.
[267 byte] By [ivanchia] at [2007-11-11 10:05:21]
# 1 Re: How to Play wave file in vb2005
Try this code: http://www.freevbcode.com/ShowCode.Asp?ID=4884
Phil Weber at 2007-11-11 20:48:34 >
# 2 Re: How to Play wave file in vb2005
To: Phil Weber

After copy the declaration and the code it did not work in vb2005.
i think maybe there is a bit difference in vb2005 format

1. Error occur is(unsued local variable ; b'Ans')
2.Error occur (.net compact framework does not support Ansi,auto or unicode)
ivanchia at 2007-11-11 20:49:39 >
# 3 Re: How to Play wave file in vb2005
Ohhhh! You're using the Compact Framework. That would have been a good piece of information to include in your original post. ;-) Try this: http://www.google.com/search?q=compact+framework+play+wav
Phil Weber at 2007-11-11 20:50:33 >
# 4 Re: How to Play wave file in vb2005
To: Phil Weber

Still encounter problem . Don't know how to solve .Can you help me?
I using vb2005 in Mobile 5 to write my application.Which need to retrieve wavefile from my C; drive and play it out for the user.Below is the error code .

Thank you

--------------------------
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

PlayBackgroundSoundFile()
My.Computer.Audio.Play("C:\Waterfall.wav", _
AudioPlayMode.Background)

End Sub
End Class
ivanchia at 2007-11-11 20:51:38 >
# 5 Re: How to Play wave file in vb2005
hi all ,

Is there anyone can kindly help me to troublesoot above code.

A thousand thank to all of you .
ivanchia at 2007-11-11 20:52:42 >