Trouble with Picturebox Locations

I have a little map generation program I am making. There are a set of movable picture boxes. I would like to have it so that I can save the location a user leaves the picturebox at so that when a map is loaded it moves to the last location the left it at.

so I try and get it by using

 file.appentalltext(file,picturebox.location) 

This gives me the line like {X=373,Y=266}

Perfect. I get the location.

Now I go to update it in my loadMap function by going…

Dim sr as new streamreader(file) picturebox.location = new point (sr.readLine) 

Good news is that it DOES move the picture box to a new location. Unfortunately the location is miles away from where I place it. {X=373,Y=266} places it around the middle of my form. It loads nearly in the corner of the form.

Anyone have any idea why and how I might get a more accurate location?

submitted by /u/Thunor_SixHammers
[link] [comments]

Leave a Reply