The error you got happened with very small images, in that case it could happen that even Scroll.Maximum became negative and if the Scroll.Minimum value is bigger than Scroll.Maximum then Scroll.Minimum is set to Scroll.Maximum.
I hadn't tested the program with small images.
Attached an updated version, 6.90 beta version.
I don't have a bitmap to zoom for-real; what I will be doing is drawing a fresh bitmap.
I don't really understand what you do mean with fresh bitmap?
In any case you have a bitmap with a given size and a given scale.
The bitmap could be an empty one or a background map. I'm shure that you will need scrolling and zooming.
You have 2 choices for the zooming:
- zoom the whole bitmap and extract the desired part and copy it to the form.
- extract the desired part from the bitmap, zoom it and copy it to the form
The attached program uses the 2nd method.
For your application I would suggest you to use the first method, it is more efficient if you want to scroll the image. The ZoomScaledImage program from the Graphics tutorial and the ScaledMaps program both use the first method.
Best regards.