Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Visual Basic 2008; Array of Images

Name: Anonymous 2009-05-20 15:58

Need some help /prog/


How would you store 10+ images in an array from the same folder using Visual Basic 2008?
The images are named 1.jpg, 2.jpg, etc..


The reason I need to do this is because I need to know how many times the picture has been displayed.
For example,
1. Program Start--> Image[0][0]
2. Image[0] is used once--> Image[0][1]


Image[0][1]
[0] is the image
[1] is an integer counting how many times it has been used

Name: Anonymous 2009-05-20 16:16

Do something like:

[code]
'Creates an array that can hold 10 images, with 0 and 1 values
Dim Image_Array(9,1) As Integer

Image_Array(0,0)
Image()
Image_Array(x+1, y+1)


Private Function Image As Action
If Image_Array(0,0)
PictureBox.Image = "Image1.jpg"
[code]


Okay sorry I haven't done VB in a while.
Basically make an array of integers, load up your .jpgs, and each .jpg represents an individual integer, etc..

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List