'Alex Maureau, Queens College
'Credits:
'http://www.codeproject.com/vb/net/SoundClass.asp
'by Angelo Cresta
Imports System
Imports System.Runtime.InteropServices
Imports System.Resources
Imports System.IO
Public Class Sound
Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name _
As String, ByVal hmod As Integer, _
ByVal flags As Integer) As Integer
Public Const SND_SYNC = &H0 'play synchronously
Public Const SND_ASYNC = &H1 'play asynchronously
Public Const SND_LOOP = &H8 'play with a loop
Public Shared Sub PlayWaveFile( _
ByVal fileWaveFullPath As String)
Try
PlaySound(fileWaveFullPath, 0, SND_ASYNC)
Catch
End Try
End Sub
End Class
No comments:
Post a Comment