visual basic使用轨迹栏/滑块调整音量

时间:2014-07-01 05:16:54

标签: visual-studio-2012 audio slider volume trackbar

我有一个使用此代码播放背景音乐的程序

My.Computer.Audio.Play("bgsound.wav", AudioPlayMode.BackgroundLoop)

如何让TrackBar(或滑块)控制其音量,并尽可能保持简单!感谢

这就是我对它看起来像什么的想法

Private Sub TrackBar1_Scroll(sender As Object, e As EventArgs) Handles TrackBar1.Scroll
    'get the value of trackbar in a variable
    Dim Value = TrackBar1.Value
    My.Computer.Audio.Volume = Value 'i know this doesn't exist. This is what i need to know what to say
End Sub

0 个答案:

没有答案