use of scroll stretches controls - get redrawn

bwells

Regular
Joined
Feb 25, 2003
Messages
84
In my MDI app, when the user shrinks an MDI child form so scroll bars appear, then the uesr then drags the vertical scroll bar down, the contents of the form seem to get partially redrawn so they appear to stretch down. When the user stops the drag of the scrollbar, then the form draws itself and it looks fine.

What would cause the controls to not get re-drawn correctly on a scroll event? I am not listening or processing the scroll event, and I would expect the contents of the form to move smoothly on a scrollbar drag as if it is larger than the container. But instead it looks like the form/contols are being drawn as the scrollbar is being dragged.

Any thoughts on how to make the scrolling look smooth?

thanks
Bryan
 
Last edited:
In the on Scroll (VScoll) I think even just tell the for to refresh

Or

Visual Basic:
form.invalidate()

Sorts it self out but this make scrolling slower
 
I am having trouble finding any way to register for scroll events. I set the autoscroll property to true, but otherwise, there does not seem to be a delegate for scroll events on a Form.

Can you be more specific?
 
I've never tried doing this, but you could try overriding OnLayout. I guess that would be called when the user scrolls, amongst other things.
 
I tired the OnLayout but it did not get called when I scrolled, only when I resized the dialog.

Can you think of a reason why my controls would appear smeared istead of smoothly scrolling? I am sure I have done something to cause this. Perhaps it is a function of the panel containing the controls. I am running an animation in some windows, but the CPU usage is low.
 
Back
Top