I want to simulate Aero Snap functionality by my own. And for stick Form
to a screen's side I'm using solution from this question.
The problem is that after I call:
ShowWindow(Handle, SW_MAXIMIZE);
Form
immediately maximizes and after call MoveWindow
changes it's size to needed size. And this jump of the Form
is visible and annoying. To prevent it I tried to disable handling of messages WM_GETMINMAXINFO, WM_SIZE, WM_MOVE, WM_NCCALCSIZE, WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGED
in WndProc
. It helps but not completely. Is there any analog SuspendLayout()/ResumeLayout()
for Form
resizing?