'函数声明
Public Declare Function PlaySound Lib "CoreDLL.dll" (ByVal lpszSoundName As String, _
ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
'代码中播放psychoman.wav文件
Dim sPath As String = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
PlaySound(sPath + "\\psychoman.wav", 0, 2)
PlaySound 函数我是这样声明的:
Public Declare Function PlaySound Lib "winmm.dll" (ByVal lpszSoundName As String, _
ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer