| | |
How do you access pictureboxes as arrays
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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 .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms ftp generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





