I have 100 buttons forming a 10 X 10 grid.
When I click Button100 I want every button's backColor to change to Black.
The only way I know how to do this, is to start listing them one at a time:
Private Sub Button100_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button100.Click
Button1.backColor = color.black
Button2.backColor = color.black
Button3.backColor = color.black
... etc etc until you get to Button100 ... but this method takes up loads of CPU and I know there is an easier way ... I'm just too new at VB.
Is there a way I can simply denote (Button1 THROUGH Button100). backColor = color.black ?
Thank you so much for any help!
2007-06-26
11:36:09
·
3 answers
·
asked by
djdeity25
1
in
Computers & Internet
➔ Programming & Design