If you're in the full framework, how about a control array? If you're in the compact framework, maybe create a dictionary using "Button1" etc as the key. Initialise this in the form constructor.
David "If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate!" -Zapp Brannigan, Futurama On Tue, Jul 26, 2011 at 13:17, Anthony Mayan <[email protected]> wrote: > I have a form with many buttons. > > I want to be able to set the text property of the textbox at runtime by > string. > > ("Button" & i).Text = "Hello" 'Of course this doesn't work...how do i > replicate this correctly > > i a variable > > eg if i=1 then i want the code to do button1.text="Hello" > if i=2 then i want the code to do button2.text="Hello" > > > any suggest
