日期:2014-05-17 浏览次数:20929 次
private void pictureBox1_MouseMove(object sender,System.Windows.Forms.MouseEventArgs e)
{
this.Text=String.Concat("当前鼠标位置:","(",e.X.ToString(),",",e.Y.ToString(),")");
/* if (e.Button == MouseButtons.Left)
{
pictureBox1.Location = new Point(Cursor.Position.X - (p.X - cp.X), Cursor.Position.Y - (p.Y - cp.Y));
}*/
}
private void pictureBox1_MouseHover(object sender, System.EventArgs e)
{
this.Text = "单击左键放大图片,单击右键缩小图片,用光标移动图片";
}
private void pictureBox1_MouseLeave(object sender, System.EventArgs e)
{
this.Text = "作品信息查询";
}
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
/* p.X = Cursor.Position.X;
p.Y = Cursor.Position.Y;
cp.X = pictureBox1.Location.X;
cp.Y = pictureBox1.Location.Y;*/
//double scale = 1.0;
if (e.Button == MouseButtons.Left) scale = 0.9;
//if (e.Button == MouseDoubleClick) scale = 0.9;
pictureBox1.Size = new System.Drawing.Size((int)(pictureBox1.Width * scale), (int)(pictureBox1.Height * scale));
}
double scale = 1.0;
private void pictureBox1_DoubleClick(object sender, EventArgs e)
{