C# 禁止通过标题栏移动窗体

 1 protected override void WndProc(ref Message m)
 2 {
 3 base.WndProc (ref m);
 4 if(m.Msg == 0x84) //不让拖动标题栏
 5 {
 6      if ((IntPtr)2 == m.Result)
 7      m.Result = (IntPtr)1;
 8 }
 9 
10 }
原文地址:https://www.cnblogs.com/dreamos/p/10956569.html