按钮拖拽移动

来源:互联网 发布:淘宝十字绣回收 编辑:程序博客网 时间:2024/05/17 07:28
      private void button1_MouseMove(object sender, MouseEventArgs e)        {            if (e.Button == MouseButtons.Left)            {                Button btn = (Button)sender;                btn.Location = new Point(PointToClient(MousePosition).X - 30, PointToClient(MousePosition).Y - 30);            }        }

0 0
原创粉丝点击