0

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

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
4

0 回答 0