protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case (int)Msgs.WM_NCCALCSIZE:
// If AutoScroll is set to false, hide the scrollbars when the control
// calculates its non-client area.
if (!this.AutoScroll)
NativeMethods.ShowScrollBar(m.HWnd, (int)ScrollBars.SB_BOTH, 0 /*false*/);
break;
}
base.WndProc(ref m);
}