How do I create a map file? I need to stop a picture from going off the form... do i need a special program to do that?
Printable View
How do I create a map file? I need to stop a picture from going off the form... do i need a special program to do that?
Oh boy, this will be a long thread. You need to store the map in a 2d array. And then I guess just save the array as .map
Yeah, that's what i think Steve, ok let's start from the beginning...
For the map, you declare the width, the height and the map array
The map array is now dynamic so that you can change the size of it anytime:Code:private height as integer
private width as integer
Map() as byte
To store this array you open the file in binaryCode:height=30
width=30
redim map(width,height)
And to read it again you use Get isntead of putCode:Open Filename for Binary as #
Put#1,,width
Put#1,,height
Put#1,,map
Close 1
Code:Open Filename for Binary as #
Get#1,,width
Get#1,,height
Redim map(width,height)
Get#1,,map
Close 1