I'm creating a form with FormBorderStyle
set to None
.
I am using the following to enable Aero Snapping:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
{
cp.Style |= 0x20000 | 0x80000 | 0x40000; //WS_MINIMIZEBOX | WS_SYSMENU | WS_SIZEBOX;
}
return cp;
}
}
This works fine except it creates two issues.
- I now have a white border on the top of my form that I cannot remove.
- When I snap the form to the top of the screen, it fills the entire screen, covering the taskbar.
I am definitely a beginner at this so any help would be very much appreciated.