load image

wilk06

New member
Joined
Oct 4, 2007
Messages
2
Programming Experience
Beginner
I am wanting to load an image into an array. But I keep getting a NULL error?!

I have so far:

Dim b(42) as picturebox
Dim path as bitmap
Dim x as integer


path = New Bitmap(System.Environment.CurrentDirectory & "\blank.png") 'tells it where the blank image is

For x = 1 To 42
b(x).Image = path
Next x

Anyone see what I am doing wrong?
Cheers
Chris
 
You have created a carpark with 43 available spaces, but you haven't put any cars there. Here is an example to assign a reference to a new picturebox in "cell" 24:
b(23) = New PictureBox
 
Back
Top