2. Submitted By
Akshay Sharma
BCA 3rd Year
Dezyne E´cole College
106/10, Civil Lines, Ajmer
Tel: 0145-2624679
www.dezyneecole.com
2016-2017
Hexadecimal color Plate
3. Acknowledgement
This Hexadecimal Color Plate create in “Visual Basic” was developed at
Dezyne E’cole College.
During the making of this project I have learnt a lot and I thank my mentor
Mr. Tarun Sharma for helping us during the making of project.
I thank my college “Dezyne Ecole College” for helping us to bring out our
skill.
With due Regards,
Akshay Sharma
BCA 3rd Year
4. Color Plate using Scroll bar and calculate
Hexadecimal Code
Dim rr, gg, bb, s1, c1, c2 As String
Private Sub Form_Load()
rr = "FF"
gg = "FF"
bb = "FF"
End Sub
Private Sub VScroll1_Change()
a = VScroll1.Value
Text1.Text = a
r = Hex(VScroll1.Value)
Text4.Text = r
Label1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label2.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label3.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label5.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label6.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
End Sub
Private Sub VScroll2_Change()
b = VScroll2.Value
Text2.Text = b
5. g = Hex(VScroll2.Value)
Text5.Text = g
End Sub
Private Sub VScroll3_Change()
c = VScroll3.Value
Text3.Text = c
b = Hex(VScroll3.Value)
Text6.Text = b
End Sub
Private Sub VScroll1_scroll()
a = VScroll1.Value
Text1.Text = a
' r = Hex(VScroll1.Value)
r = check(a)
Text4.Text = r
Form1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label2.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label3.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label5.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label6.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
End Sub
Private Sub VScroll2_scroll()
b = VScroll2.Value
Text2.Text = b
'g = Hex(VScroll2.Value)
g = check(b)
Text5.Text = g
Form1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label2.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label3.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label5.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label6.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label7.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label8.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label9.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
End Sub
Private Sub VScroll3_scroll()
c = VScroll3.Value
Text3.Text = c
'b = Hex(VScroll3.Value)
b = check(c)
6. Text6.Text = b
Form1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label1.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label2.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label3.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label5.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Label6.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
End Sub
Function check(ByVal a As Integer)
c1 = a Mod 16
c2 = a 16
If c1 = 10 Then
c1 = "A"
ElseIf c1 = 11 Then
c1 = "B"
ElseIf c1 = 12 Then
c1 = "C"
ElseIf c1 = 13 Then
c1 = "D"
ElseIf c1 = 14 Then
c1 = "E"
ElseIf c1 = 15 Then
c1 = "F"
Else
s1 = Str(c1)
End If
If c2 = 10 Then
c2 = "A"
ElseIf c2 = 11 Then
c2 = "B"
ElseIf c2 = 12 Then
c2 = "C"
ElseIf c2 = 13 Then
c2 = "D"
ElseIf c2 = 14 Then
c2 = "E"
ElseIf c2 = 15 Then
c2 = "F"
Else
s1 = c1 & c2
check = s1
End If
End Function