每次点击某个地方,我都可以创建一个播放声音的程序吗?我真的需要这个。就像在某些操作系统中,每次点击窗口时它都会发出声音。

答案 0 :(得分:0)
使用Button_Click
Event显示示例。
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
My.Computer.Audio.PlaySystemSound( _
System.Media.SystemSounds.Exclamation)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
My.Computer.Audio.Play("C:\Mysound.wav", _
AudioPlayMode.BackgroundLoop)
End Sub