发条陈论坛-C#-无标题窗口随意移动

  protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x0201)
            {
                m.Msg = 0x00A1;//更改消息为非客户区按下鼠标
                m.LParam = IntPtr.Zero;
                m.WParam = new IntPtr(2);//鼠标放在标题栏内
            }
            base.WndProc(ref m);
        }


来自--发条陈论坛 C#爱好者的论坛 ftchen.com

猜你喜欢

转载自blog.csdn.net/chencong5025/article/details/7603710