Click to See Complete Forum and Search --> : How to put graphics in array?
phlogiston
May 2nd, 2002, 10:11 PM
How do you put graphics in array?
and then how do you make it show on the form
sorry~
i'm a total idiot when it comes to Vb
ChiefRB
May 3rd, 2002, 04:17 AM
Well, you can do this several ways. You can either place the graphics within a control array of pictureboxes or imageboxes, or you could store an array of StdPicture objects in memory.
The solutions depends on what you're trying to do I suppose...
phlogiston
May 3rd, 2002, 09:19 AM
thanks fo the help, Chief
i'm trying to make a RPG like game
The array of pictures are for the map which the characters will be moving on
i think i'm suppose to use a tile engine of some sort but i don't know how
so how exactly would you put the thing in code?
ChiefRB
May 3rd, 2002, 10:26 AM
Well, if you're making a tile engine.... I'd do it like this:
You don't need to store stuff in an array. Construct one large image of all your smaller image tiles in a grid. Leave no spacing between them, but they must all be the same size.
Then, place that in a picturebox on your form.
You can now use the BitBlt API call to copy each tile out of the box and draw it onto your main game picturebox. Look ok www.allapi.net for more info on the API.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.