C#禁止拖动的标题栏, 双击标题栏无反应


protected override void WndProc(ref Message m)
{
    base.WndProc(ref m);

    if(m.Msg == 0x84 && m.Result == (IntPtr)2// 不让拖动标题栏
    {
        m.Result = (IntPtr)1;
    }
    if (m.Msg == 0xA3)                         // 双击标题栏无反应
    {
        m.WParam = System.IntPtr.Zero;
    }
}
posted on 2012-03-02 16:29  一路前行  阅读(824)  评论(0编辑  收藏  举报