Variable Help
I've started to messing with VB a couple of days ago and I have a question
Let's say I have some buttons named: House,Car,Tree
etc
The part of getting the button name I already learned what I need is:
Let's say
X = "House"
How can I put something for a pictu开发者_C百科rebox named "pHouse" for example
[pX.visible = True]
be the same as if I wrote [pHouse.visible = True]
and so on being the same for Car / pCar, Tree / pTree, etc... ?
If i got your question correctly you need all button as array.First create a button and then copy it and paste to the form.Save yes will create button array.Change the caption as you needed House,Car,Tree etc.Now you can access each button with the item index.Like button1(i).visible=true.where i is index of your targetted button
精彩评论