我通过在一个panel中放入几个picturebox来作为toolbar当鼠标移动到和离开picturebox上的时候,通过改变picturebox
的坐标来实现动态效果,当第一次启动程序,toolbar显示正常,有
动态效果,但是最小化到系统栏托盘之后再双击最大化界面,toolbar
上的picturebox动一下之后就不正常了,不再有动态效果了
实现动态效果的代码如下:
private void pictureBox4_MouseEnter(object sender, System.EventArgs e)
{
this.pictureBox4.Location = new Point (this.pictureBox4.Location.X+2,this.pictureBox4.Location.Y-2);
} private void pictureBox4_MouseLeave(object sender, System.EventArgs e)
{
this.pictureBox4.Location = new Point(this.pictureBox4.Location.X-2,this.pictureBox4.Location.Y+2);
}谢谢