Private Sub Form_Load()
Dim ColorCode As Long
' visa commondialogen
CommonDialog1.ShowColor
' vilken färg valdes?
ColorCode = CommonDialog1.Color
' Colorcode översätts till det hexadecimala värdet
HexColor = HexRGB(ColorCode)
End Sub
'
Sub HScroll1_Change ()
Label1.BackColor = RGB(Hscroll1, Hscroll2, Hscroll3)
text1.Text = "<" + "#" + Hex(Hscroll1) + Hex(Hscroll2) + Hex(Hscroll3) + ">"
If text1.Text = "<#000>" Then
text1.Text = "<#000000>"
End If
End Sub