I have a location validation app that accesses prefetched map images, and allows a user to compare the map with current photo of a house at high resolution. The prefetched static maps are larger and designed to show context of the neighborhood, not the selected house. The Picturebox properties are 513x406 and its location is 724x127. When I display the map, I want to specify a centered fixed magnification, and keep the display within the picturebox. Here is my code to do the displays. I have tried every combination of zoom and stretch without success. This most recent try simply increased the size of the picturebox.
SnippetDisplayOut.Show()
SnippetDisplayOut.SizeMode = PictureBoxSizeMode.CenterImage
SnippetDisplayOut.SizeMode = PictureBoxSizeMode.Zoom
SnippetDisplayOut.Image = Image.FromFile(RGB_Snippetname, True)
MapDisplayOut.Image = image2
MapDisplayOut.Show()
MapDisplayOut.SizeMode = PictureBoxSizeMode.Zoom
MapDisplayOut.Size = New Size(800, 800)
Me.DoubleBuffered = True
MapDisplayOut.SizeMode = PictureBoxSizeMode.CenterImage
MapDisplayOut.Image = FromFile(MapFileName, True)