-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.vb
34 lines (23 loc) · 977 Bytes
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Public Class Form1
Dim aA As Color
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer = NumericUpDown1.Value
Dim b As Integer = NumericUpDown2.Value
Dim c As Integer = NumericUpDown3.Value
Label1.ForeColor = cc(a, b, c)
Label1.BackColor = cc(255 - a, 255 - b, 255 - c)
End Sub
Function cc(ByRef a As Integer, ByRef b As Integer, ByRef c As Integer)
aA = Color.FromArgb(a, b, c)
Return aA
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NumericUpDown2.Maximum = 255
NumericUpDown3.Maximum = 255
Me.BackColor = Color.BlueViolet
End Sub
Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
Me.Width = 300
Me.Height = 300
End Sub
End Class