How to fix scrollbars when the window or container is resized?

前端 未结 2 1601
遥遥无期
遥遥无期 2020-12-21 08:54

Currently in my application I am using the HScrollBar and VScrollBar for panning around in a large image. The part of the image that is shown is based on the scrollbar\'s Va

2条回答
  •  再見小時候
    2020-12-21 09:33

    Try calling the scrollbar's Invalidate() method in the form's resize event handler:
    http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invalidate.aspx

    That should cause it to redraw correctly after the form is resized.

提交回复
热议问题