You may want to check the ScaleMode property of your Picture Box. VB's default is Twip, but you may need to set it to Pixel for your code. I really don't know if that would have an effect on SavePicture, but it's something to try.
1) If your picturebox has a fixed size (i.e. the size is not set at runtime). Your problem should be solved by setting the borderstyle to 1 (fixed single).
2) If your have to resize the picturebox or form (the problem is the same for forms). If you make the picture box larger, you can still do with just setting the border style to 1. The only solution I came up with when making the picturebox smaller is to use picture1.cls. That will erease the content of the pictuebox and you'll have to draw it agian (which probably is true anyway since your makeing the area samller). But it will make sure that you'll get the correct image size when using savepicture (or an other way of saving the .image to a file)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.