Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting background color of a form

Private Sub HScrollBar1_Scroll(ByVal sender As Object, _
                               ByVal e As ScrollEventArgs) _
                               Handles HScrollBar1.Scroll
  Me.BackColor = HScrollBar1.Value
End Sub

How can I set the BackColor of the form? How can I use an RGB value?

like image 598
Pavalesh Avatar asked Nov 30 '22 05:11

Pavalesh


1 Answers

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

...replacing the 255 on each parameter with the value you need. e.g.

Me.BackColor = Color.FromArgb(HScrollBar1.Value,HScrollBar2.Value,HScrollBar3.Value)
like image 104
George Johnston Avatar answered Dec 16 '22 01:12

George Johnston