Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
8
Answers
How to loop through controls(different).
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Liam Stevens
13y
1.9k
1
Reply
Hi, I need to loop through a bunch of picture boxes that I have, all with names such as:
PictureBox00, PictureBox01, PictureBox02 etc.
I need to loop through these and adjust their values by what the current value in the loop is, I basically want to do this to it:
C# Syntax (
Toggle Plain Text
)
for (int i = 0; i < 3; i++)
{
PictureBox(i).enabled = false;
}
I need to access them like an array, I will not know what picturebox I would be dealing with at that time, only way I can see to do this is by using the loop, cheers.
EDIT: I think this was pretty easy to do in VB.NET via DirectCast, not sure if that would be used here(the similar version).
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
How to display column chart in group of y-axis format on pdf using itextsharp
Get c# code