B2Ben
Well-known member
- Joined
- Aug 17, 2006
- Messages
- 52
- Programming Experience
- Beginner
This may be a simple thing, but the solution escapes me as a relatively inexperienced Dot-Netter...
I have a form with 24 pictureboxes, named numerically:
"Mod0"
"Mod1"
"Mod2"
...etc...
"Mod22"
"Mod23"
I want to change properties of these pictureboxes by supplying a function with the number of the item. For instance...
function HideMod(ModNum as integer)
PictureBoxName = ("Mod" & ModNum)
'I know this next line is wrong, but can you see what I want to do?
PictureBoxName.visible = false
'I want to avoid 24 different if/then statements, and just modify each one by number/variable
end function
I hope that made sense... if anyone can help me figure this out, it would be a huge help. Thanks
I have a form with 24 pictureboxes, named numerically:
"Mod0"
"Mod1"
"Mod2"
...etc...
"Mod22"
"Mod23"
I want to change properties of these pictureboxes by supplying a function with the number of the item. For instance...
function HideMod(ModNum as integer)
PictureBoxName = ("Mod" & ModNum)
'I know this next line is wrong, but can you see what I want to do?
PictureBoxName.visible = false
'I want to avoid 24 different if/then statements, and just modify each one by number/variable
end function
I hope that made sense... if anyone can help me figure this out, it would be a huge help. Thanks