vb的题目,怎么用三个滚动条来改变textbox的颜色啊

2024-12-31 04:46:39
推荐回答(1个)
回答1:

Public Class Form1

Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
TextBox1.BackColor = Color.FromArgb(HScrollBar1.Value, 255, 255)

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
HScrollBar1.Maximum = 255
HScrollBar1.Minimum = 0
HScrollBar1.SmallChange = 10
HScrollBar1.LargeChange = 50

End Sub
End Class