Smooth scrolling

  • Thread starter Thread starter Ozone
  • Start date Start date
O

Ozone

I am developing a windows application for scrolling through multi page tif
documents (similar to ms word style). I am having difficulties achieving a
highly smooth scrolling affect. I load the entire tif into a memory stream
and access it from there. I am using a picturebox like control to view each
page of the tif, I scroll through viewers using the autoscrollbar on the
form. The problem seems to lie in the way the image is being repainted,
when scrolling up or down quickly there is the 'frames' affect, the screen
does not seem to finish repainting the new display area before the paint
event is raised again and another repaint begins (theorizing?). As I
continue to scroll down it looks as if the same small portion of image is
repainted a dozen times until it fills up the screen, the problem is solved
after the scrolling has ended and the paint is able to redraw the screen
completely. How can I smooth out the scrolling??

As well, is there any limit on the size of a form and distance a scroll bar
can scroll?

Thank you
 
Hi Ozone,

Thanks for your posting!!

Based on my understanding, you want to improve the performance of your
scrolling application.

For this issue, I agree with you that the key factor is the image drawing,
so our main task should improve the performance of the image drawing. I
think we may leverage the Double Buffer of Winform to improve the drawing.
For more details information, please refer to:
"Double Buffering Windows Forms"
http://www.bobpowell.net/doublebuffer.htm

Hope this helps.
================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Ozone,

Have you tried my suggestion of using double buffer way of improving the
scrolling performance? If you still have any problem, please feel free to
tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top