当前位置 : 主页 > 编程语言 > c语言 >

vb.net – 设置表单的背景颜色

来源:互联网 收集:自由互联 发布时间:2021-06-24
Private Sub HScrollBar1_Scroll(ByVal sender As Object, _ ByVal e As ScrollEventArgs) _ Handles HScrollBar1.Scroll Me.BackColor = HScrollBar1.ValueEnd Sub 如何设置表单的BackColor?如何使用RGB值? Me.BackColor = Color.FromArgb(2
Private Sub HScrollBar1_Scroll(ByVal sender As Object, _
                               ByVal e As ScrollEventArgs) _
                               Handles HScrollBar1.Scroll
  Me.BackColor = HScrollBar1.Value
End Sub

如何设置表单的BackColor?如何使用RGB值?

Me.BackColor = Color.FromArgb(255,255,255)

…用您需要的值替换每个参数上的255.例如

Me.BackColor = Color.FromArgb(HScrollBar1.Value,HScrollBar2.Value,HScrollBar3.Value)
网友评论