On Wed, Sep 2, 2009 at 11:01 PM, Marko D. Topic<[email protected]> wrote: > > Hi, > i have a UserControl called DoubleBufferPanel which is a typical Panel > but is set to be DoubleBuffered by the SetStyle() method. I draw my > images on that Panel and no clipping occurs, but when I set it to > AutoScroll and begin scrolling, the image becomes distorted like this: > http://www.flickr.com/photos/37459...@n04/3882558185/ > > When I resize the form which contains the panel and when I size the > image to fit the panel's dimensions everything is ok, but when I > scroll in any direction this kind of distortion keeps appearing. I > used this code to set the AutoScroll and draw the image: > > this.imagePanel.AutoScroll = true; > this.imagePanel.AutoScrollMinSize = MyBitmap.Size; > g.DrawImage(MyBitmap, new RectangleF > (this.imagePanel.AutoScrollPosition.X, this.AutoScrollPosition.Y, > MyBitmap.Width, MyBitmap.Height)); > > What is the cause of this problem and how can it be solved? >
Not sure this is a fit for you, (not sure if I understand your clipping intentions or not) but this mechanism of display might work better: http://www.techtalkz.com/c-c-sharp/125478-display-jpg-full-screen-mode.html ∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)
