VB.NET - Play a Sound file



Play a Sound file


Private Declare Function WCE_PlaySound Lib "CoreDll.dll" Alias "PlaySound" _
        (ByVal szSound As String, ByVal hMod As IntPtr, ByVal flags As Integer) As Integer

Public Shared Sub PlaySoundFile(ByVal soundFile As String)
    Const SND_ASYNC = &H1
    Const SND_FILENAME = &H20000

    WCE_PlaySound(soundFile, IntPtr.Zero, SND_ASYNC Or SND_FILENAME)
End Sub

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.