G
Guest
first let me say sorry if this is in the wrong place, i'm pretty new to
programming and to be honest i am a bit intimidated by these forums.
now that i've got that out of the way, i was bored and decided to make a
small text application in Visual Basic 2005,
i have one list box, one label and ten buttons.
the list box has 8 colors listed, and when one of them is selected and the
OK button clicked the text in the label changes color, the same with other 8
buttons, but instead of selecting a color from the list the other buttons
change the color of the text directly.
the problem is the tenth button, it's supposed to loop trough all 8 colors,
but it skips directly to the last one (purple) and stays there, the code i
used is this:
Dim myColor() As Color = {Color.Blue, Color.Red, Color.Green,
Color.Yellow, Color.Black, Color.White, Color.Orange, Color.Purple}
Dim textcollor As Color
For Each textcollor In myColor
Label1.ForeColor = (textcollor)
Next
programming and to be honest i am a bit intimidated by these forums.
now that i've got that out of the way, i was bored and decided to make a
small text application in Visual Basic 2005,
i have one list box, one label and ten buttons.
the list box has 8 colors listed, and when one of them is selected and the
OK button clicked the text in the label changes color, the same with other 8
buttons, but instead of selecting a color from the list the other buttons
change the color of the text directly.
the problem is the tenth button, it's supposed to loop trough all 8 colors,
but it skips directly to the last one (purple) and stays there, the code i
used is this:
Dim myColor() As Color = {Color.Blue, Color.Red, Color.Green,
Color.Yellow, Color.Black, Color.White, Color.Orange, Color.Purple}
Dim textcollor As Color
For Each textcollor In myColor
Label1.ForeColor = (textcollor)
Next