VB.NET中播放背景音乐最简单的办法是什么啊?

来源:百度知道 编辑:UC知道 时间:2024/09/21 17:50:19
VB.NET中播放背景音乐最简单的办法是什么啊?
我想在程序做个背景音乐 请高手们帮忙!!

给你我的程序,自己研究一下吧,我也不是很明白。

Public Class Form1

Private Declare Auto Function PlaySound Lib "winmm.dll" (ByVal lpszSoundName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
Const SND_filename As Integer = &H20000
Const SND_alias As Integer = &H10000
Const SND_sync As Integer = &H0
Declare Auto Function waveOutGetNumDevs Lib "winmm.dll" Alias "waveOutGetNumDevs" () As Integer
Declare Auto Function sndPlaySound Lib "winmm.dll" (ByVal filename As String, ByVal options As Integer) As Integer
Private Const SND_memory As Integer = &H4
Private Const SND_async As Integer = &H1
Private Const proess_domain As String = ""
Const SND_sync1 = &H0
Const SND_async1 = &H1
Const SND_nodefault = &H2
Const SND_loop = &H8
Const SND_nostop = &H10

Private Sub Button1_Click(ByVal s