第1个回答 2009-04-07
楼上说的太好了,但是没说如何做成圆滑的啊,那主要是美工,你用photoshop或者绘图等工具处理下
//移动窗体
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.Location.X - this.oldX; //新的鼠标位置
this.Top += e.Location.Y - this.oldY;
}
}
private int oldX = 0;
private int oldY = 0;
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.oldX = e.Location.X; //鼠标原来位置
this.oldY = e.Location.Y;
}
}
//关闭窗体
private void picClose_Click(object sender, EventArgs e)
{
Application.Exit();
}
第3个回答 2009-04-07
楼上说的太好了,但是没说如何做成圆滑的啊,那主要是美工,你用photoshop或者绘图等工具处理下
//移动窗体
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.Location.X - this.oldX; //新的鼠标位置
this.Top += e.Location.Y - this.oldY;
}
}
private int oldX = 0;
private int oldY = 0;
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.oldX = e.Location.X; //鼠标原来位置
this.oldY = e.Location.Y;
}
}
//关闭窗体
private void picClose_Click(object sender, EventArgs e)
{
Application.Exit();
}