码迷,mamicode.com
首页 > 移动开发 > 详细

C# 弹出层移动

时间:2019-10-23 13:40:45      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:rgs   ons   button   print   message   弹出层   handle   time   import   

 groupPrint.MouseDown += GroupBox1_MouseDown;

#region 弹出层移动
        [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "ReleaseCapture")]
        public static extern void ReleaseCapture();
        [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SendMessage")]
        public static extern void SendMessage(int hwnd, int wMsg, int wParam, int lParam);
        private void GroupBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                ReleaseCapture();
                SendMessage((int)groupPrint.Handle, 0xA1, 2, 0);

            }
        }

C# 弹出层移动

标签:rgs   ons   button   print   message   弹出层   handle   time   import   

原文地址:https://www.cnblogs.com/LuoEast/p/11725414.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!