Here, I made a 10 color palette for you:
Start with an empty form (you'll see why), with two labels: Label1(0) and Label2
Make sure that Label1 has an index of 0
When you click on a color, Label2's BackColor changes to the color selected.Code:Dim Colors(0 To 9) Private Sub Form_Load() Colors(0) = vbWhite Colors(1) = vbRed Colors(2) = vbBlue Colors(3) = vbBlack Colors(4) = vbGreen Colors(5) = vbYellow Colors(6) = vbCyan Colors(7) = vbMagenta Colors(8) = RGB(123, 123, 123) Colors(9) = RGB(255, 123, 0) Dim Num As Integer Dim y As Long With Label1(0) .Width = 255 .BackColor = Colors(0) y = .Width .Left = 0 .Top = 0 End With For Num = 1 To 9 Load Label1(Num) With Label1(Num) .BackColor = Colors(Num) .Visible = True .Width = 255 .Left = y .Top = 1 End With y = y + 255 Next Num End Sub Private Sub Label1_Click(Index As Integer) Label2.BackColor = Colors(Index) End Sub
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer




Reply With Quote