dynamically Refernce control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to build a reference to a WinForms control but I can't seem to do it...

I want to do something like (I know this is wrong):

me.Controls("Textbox" & i).Text = "Hello World!"

But I can't seem to figure it out. Please help.

Kent.
 
in c#, you can change this to:

((TextBox)this.Controls("Textbox" & i)).Text = "Hello World!"

i think vb.net will be alike.
 
Back
Top