I have 10 buttons and a textbox on my widow form.
11th button to fire the operation.
Task is that i need to input a no. in the textbox ranging from 1-10,
and press the fire button.
This should change the forecolor of the respective button in the form.
Suppose i enter 5 and press fire.
This should change the forecolor of the button5.
i.e button5.forecolor=....
I am already addressing the issue by using if statements like.
if textbox1.text == 1
button1.forecolor = red;
if textbox2.text == 2
button2.forecolor = red;
But this is hectic incase i have around 20 buttons.
So how to access the control button and its properties by specifying its id at the runtime??