C # pinned controls shake when resized

I have control over my application, which can be changed by the user, he has a button attached to the upper right side, as well as a scroll bar.
The problem is that when you resize the control, fixed to the right, the position also changes, and only after a few ms the controls get to the right place. Thus, it seems that the child controls are “shaken,” while the size of the parent control changes.

I've tried all sorts of things, such as using SuspendLayoutand ResumeLayoutthe parent control by installing double buffering and other styles for each control to true, setting a bit WS_EX_COMPOSITED, but it seems to go away.
This problem is present in other applications, and it is quite annoying.

Anyway, to fix this on .net?
Maybe this will do everything for the backbuffer, and then, when everything is ready, display it on the screen?

+4
source share
2 answers

, , 50 . ResizeEnd.

, dllimport ( , ), . , , , dllimport.

, 50 .

ResizeEnd: WinForms -

SuspendDrawing: ?

+2

System.Drawing;

  protected override Point ScrollToControl(Control activeControl)
    {
        return AutoScrollPosition;
    }

!

0

All Articles