Images cannot change

So recently, I've been up to making a "breakout" type game in VB. I know, VB is not the best for making any type of game, but anyways.
I created my first project that will be my game. in it, I had a panel and 143 bricks inside. These pictureboxes used some images I made on the computer to represent the bricks, there are 10 different colors/images (the images are in the my resource file).
After, I created another project that I, the game-maker, will use to design the levels. Again, I have the panel and the 143 bricks inside all using the same images (with the same names as well so i can just copy the code that puts all of the prictureboxes into an array).
That's the basic idea of what I did, maybe there's a problem in there. So here's the question:
In my second project, the picturebox that represented my bricks (that I recreated, picturebox by picturebox, not copied) will not change images.During the designing of the form, you can change the pictureboxes to whatever image you want, but when you debug the program, it just returns to the same pattern as it was before (the first pattern I used, also the same pattern as in my first project). The string in the Image property is "System.Drawing.Bitmap". also if I use a resource file, ("Breakout_LD.My.Resources.Resources.Gold", for example,) the image will not appear, only the picturebox.
Now that this little bug happened in my second project, my first project, the actual game, is buggy too. now it doesn't matter what you use, in the first project, when you debug it, the pictureboxes always display the same pattern.
Please help, changing the color of the bricks is vital to the game's different levels and also to my programmer's pride/sanity.
Thank you.


Answer this question

Images cannot change

  • Newbie71

    Oh, the last thing i left out... heh,
    I don't mean when the program runs, I just mean using the design window. (you know, Properties window on the right -> images -> the "..." button -> resource ... ...)
    even if, i say change the original pattern (which is rainbowish btw) and make all 143 pictureboxes show the white brick image (in the design window) it'll still show up on the program as the rainbow pattern. (unless , of course I change the picturebox's positions) the idea is that the picturebox named "Brick142" will always display the gold brick image, the picturebox named "Brick0" will always display the red brick image, and if you change the image to a resource file, it will either do nothing (first project) or it will display no image (second project).

  • Bhupal

    In order to help you we would need to ssee the code that is suppose to change the image of the picturebox.

  • Images cannot change