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);
                }
            }
        }

  

posted @ 2021-02-06 19:46  修石  阅读(69)  评论(0编辑  收藏  举报