|
Hi, I wrote a small application which uses a panel with autoscroll, on which I draw a image. The image can be painted at diferent zoom values, and when I zoom in, a specified point from the image must be in the center of the panel ( that is, I zoom the image and the center of the picture will be always found in the center of the panel). To achieve this, when the zoom value is changed, I also modify the AutoScrollMinSize and AutoScrollPosition properties, to match the scrolls to the new image size and position.
The problem is that when I set the AutoScrollPosition property, the image found on the panel is automaticaly scrolled by the framework, to accomodate the new change of position of the scrolls. And this causes flicker on the image.
How can I stop the automatic scrolling of the image found on the panel ?
|