vb的题目,怎么用三个滚动条来改变textbox的颜色啊
为什么总是代码错误,说integer的值无法转换为system.drawing.color无论我是一个个设,TextBox1.ForeColor=HScrollBar1....
为什么总是代码错误,说integer的值无法转换为system.drawing.color
无论我是一个个设, TextBox1.ForeColor = HScrollBar1.Value
还是一起设,TextBox1.ForeColor = RGB( HScrollBar1.Value HScrollBar2.Value, HScrollBar3.Value) 那要怎么改的啊啊 展开
无论我是一个个设, TextBox1.ForeColor = HScrollBar1.Value
还是一起设,TextBox1.ForeColor = RGB( HScrollBar1.Value HScrollBar2.Value, HScrollBar3.Value) 那要怎么改的啊啊 展开
展开全部
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
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
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询