| | |
How do you access pictureboxes as arrays
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
I have a whole bunch of pictureboxes on my form, they have the name picturebox1, picturebox2...picturebox36, and I was wondering if there was a way I could access them using an array. Would I have to create them using a picturebox array and manually type in their locations and such, because I would not like to do that if possible.
Thanks,
Eric Berger
Thanks,
Eric Berger
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
I found out how to do this:
vb.net Syntax (Toggle Plain Text)
Public MedalPicBoxes(35) As PictureBox Sub InitializePics() MedalPicBoxes(0) = PictureBox1 MedalPicBoxes(1) = PictureBox2 ........... MedalPicBoxes(34) = PictureBox35 MedalPicBoxes(35) = PictureBox36 End Sub
Last edited by eberger2001; Oct 19th, 2008 at 4:53 am.
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
I found out how to do this:
vb.net Syntax (Toggle Plain Text)
Public MedalPicBoxes(35) As PictureBox Sub InitializePics() MedalPicBoxes(0) = PictureBox1 MedalPicBoxes(1) = PictureBox2 ........... MedalPicBoxes(34) = PictureBox35 MedalPicBoxes(35) = PictureBox36 End Sub
Last edited by eberger2001; Oct 19th, 2008 at 4:53 am.
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: login as admin , HOW !?
- Next Thread: Public Overrides Function ToString()
| Thread Tools | Search this Thread |
.net .net2005 .net2008 30minutes 2005 2008 access account arithmetic array basic browser button buttons center check code component connectionstring crystalreport cuesent data database databasesearch datagrid datagridview date datetimepicker design dissertation dissertations dissertationthesis dissertationtopic dropdownlist excel fade file-dialog filter folder ftp generatetags hardcopy image images input insert intel math monitor net networking opacity output panel passingparameters peertopeervideostreaming picturebox picturebox1 port printing problem problemwithinstallation project reports" savedialog searchvb.net select serial settings shutdown string survey tcp temperature text textbox timer timespan toolbox transparency trim updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





