C#中如何实现无标题栏窗口的拖动
谁知道在C#中如何实现无标题栏窗口的拖动嘛?各位强人帮帮忙啊,小弟急~
private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Left)
{
mouseDown = true;
}
}
private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
mouseDown = false;
}
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Left)
{
if(mouseDown)
{
this.Location = new Point(MousePosition.X,MousePosition.Y);
}
}
}