C# 拖动无边框窗体
protected override void WndProc(ref Message m) { //拖动无边框窗体 if ((m.Msg == 132)) { base.WndProc(ref m); if ((m.Result == (IntPtr)1)) { m.Result = (IntPtr)2; } } else { if ((m.Msg == 163)) { } //屏蔽最大化! else { base.WndProc(ref m); } } }
protected override void WndProc(ref Message m) { //拖动无边框窗体 if ((m.Msg == 132)) { base.WndProc(ref m); if ((m.Result == (IntPtr)1)) { m.Result = (IntPtr)2; } } else { if ((m.Msg == 163)) { } //屏蔽最大化! else { base.WndProc(ref m); } } }