This document is a Visual Basic assignment submitted by Deepak Soni, a third year BCA student at Dezyne E'cole College in Ajmer, India. The assignment involves creating a color palette using Visual Basic. Deepak thanks his mentor Tarun Sharma for helping with the project and his college for hosting an exhibition to showcase student skills. The assignment includes Visual Basic code to create scroll bars to adjust RGB color values and update labels on the form to display the selected color. It also includes a function to convert decimal color values to hexadecimal notation.
1. Visual Basic Assignment
Submitted By
Deepak Soni
BCA – 3rd Year
Dezyne E’ cole College
106/10, Civil Lines, Ajmer
Tel: 0145-2624679
www.dezyneecole.com
2015-2016
A WORK REPORT SUBMITTED
IN PARTIAL FULLFILLMENT OF THE REQUIREMENT FOR
THE DEGREE
Bachelor of Computer Application
2. Acknowledgement
This color Palette 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 E´cole College” for having conducted this
“Identity” exhibition for helping us to bring out our skill.
With due Regards,
Deepak soni
BCA 3rd Year
3. Color Palette
CODE:
Dim rr, gg, bb, s1, c1, c2 As String
Private Sub Form_Load()
Label10.Font.Size = 15
Label1.FontBold = True
Label10.ForeColor = vbBlack
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)
4. 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)
Label10.BackColor = RGB(VScroll1.Value, VScroll2.Value,
VScroll3.Value)
End Sub
Private Sub VScroll2_Change()
b = VScroll2.Value
Text2.Text = b
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)