Is there a way to create a shadow for a borderless form that doesn't flicker when the form is resized? Right now I'm using CreateParams.
protected override CreateParams CreateParams
{
get
{
const int CS_DROPSHADOW = 0x20000;
CreateParams cp = base.CreateParams;
cp.ClassStyle |= CS_DROPSHADOW;
return cp;
}
}
But when the form is resized, the shadow part turns white, then back to a shadow, flickering. The rest of the form doesn't because I used this.DoubleBuffered = true;
Any help is appreciated, thanks!
Edit:
I resize the form by using SendMessage
private const int WM_NCLBUTTONDOWN = 0xa1;
SendMessage(handle, WM_NCLBUTTONDOWN, dir, 0);
dir
is an int that varies depending on the direction I want to resize the form.