We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Replacement for Indexing Buttons?

'In VB6 I would have had sets like: (cut out unimportant items) Begin VB.CommandButton btnPlayerInfo Caption = "Player1 Info" ... Index = 0 ... End Begin VB.CommandButton btnPlayerInfo Caption = "Player2 Info" ... Index = 1 ... End 'With that I could call a "for" loop like so: (overly simplified) For X = 0 to 7 frmMain.btnPlayerInfo(X).Text = Player(X).Name & "'s Info" Next X I am looking for an equivalent in VB.Net rather then having to say: ...btnPlayerInfo1.Text = Player(0).Name & "'s Info" ...btnPlayerInfo2.Text = Player(1).Name & "'s Info" ...btnPlayerInfo3.Text = Player(3).Name & "'s Info" and so on for every single value I need to set in the forms...

Loader.
Up arrow icon