tags:

views:

1257

answers:

1
+1  Q: 

C# Resizing Form

I'm having problems programmatically resizing a Form in C# while it's being dragged.

In a nutshell, I change the dimensions of the Form while its moving, the problem is that there is HUGE flicker, and when the mouse "lets go" of the titlebar, the Form goes back to its original size! So it's basically ignoring the resizing part.

I tried several Events like LocationChanged and Moved and even tried catching WM_WINDOWPOSCHANGING in WndProc. It seems that Forms resize themselves once they are done moving.

Any ideas?

A: 

Try this custom winforms technique.

JMSA