I have a large background image (3500x2400 3.5mb jpeg) that I placed as the background image for a panel
Then I sized the panel to 3500x2400 and placed it on a form with AutoScroll and ran the application.
The image displays, and I can scroll, but when I scroll I can see the image breakup as the screen is being redrawn.
IOW, it lags on my high performance pc. If you make a new windows forms project with the above mentioned setup and use a very large image and you'll see the same effect.
How can I scroll around the image smoothly? It doesn't have to be the same setup as above with a panel in a form, it just has to work.
I also tried just overriding the OnPaint method of the form, and drawing the portion of the image depending on the value of the scrollbars. I then called Invalidate() in the on scroll event handler. That was a terrible idea and is about ten times slower because now the entire form flashes when I try to draw the image, but at least I ruled it out as a viable alternative.
I even tried a directx implementation of the panel. It had no effect. I'm sure if I spend enough time playing with directx I can get the image scrolling smoothly, but I have a bad feeling I would have to abandon the whole windows forms interface altogether for a directx interface.
I really want to avoid that if I can.
I'm running out of ideas, can anybody think of a way to make the scrolling smooth without visible redraw effects (like when you scroll on a form with a solid color background)