//鼠标在标题处按下时记录鼠标位置
private void label_caption_MouseDown(object sender, MouseEventArgs e)
{
mousePoint = new Point(e.X, e.Y);
}
//鼠标按住标题移动时移动窗体
private void label_caption_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.SetBounds(this.Location.X + e.X - mousePoint.X, this.Location.Y + e.Y - mousePoint.Y, this.Width, this.Height);
}
}
06-15
1075
06-09
2354
05-01
415