So I have 9 buttons on my form , and when I press on a button I want to select one of the 9 buttons and change his text to – “random” . How can I do that in visual basic 2008/2010 ?
I was thinking to something like
For Each buttons In Panel1.Controls
If TypeName(buttons) = "Button" Then
//select a random button and change his text to "random"
End If
Next buttons
I have not used VB, so just did this in C#. May be same/very similar in VB.
Edit: To answer your comment try something like the following: