I am using the following code to save an image created on a Form to a bitmap file:
SavePicture Form1.Image, Output_Dir + Patternname + ".bmp"
DoEvents
Now the image created on the form is a 1600x1200 pixel image (which looks correct); however, when I save the file using the above code the image is always saved as a 1920x1200 pixel bitmap.
1920x1200 is the current resolution of my screen.
Here is the code used to set the width/height of the form image:
Form1.ScaleMode = vbPixels
Form1.AutoRedraw = True
W = 1600
H = 1200
Form1.Width = W * Screen.TwipsPerPixelX
Form1.Height = H * Screen.TwipsPerPixelY
Form1.Show
I cannot seem to understand why the form image looks correct at 1600x1200, yet when I save the program adds an extra white block of 320X1200 to make the bitmap 1920x1200.