zoukankan      html  css  js  c++  java
  • 无标题窗口的移动

    WinForm:

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


    WPF:

            protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
            {
                base.OnMouseLeftButtonDown(e);
                this.DragMove();
            }


  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/wmesci/p/2736000.html
Copyright © 2011-2022 走看看