private void button6_MouseMove(object sender, MouseEventArgs e) { button6.ImageAlign = ContentAlignment.MiddleLeft;//鼠标移动到button6时改变图片位置 } private void button6_MouseLeave(object sender, EventArgs e) { button6.ImageAlign = ContentAlignment.MiddleCenter;//鼠标离开时改变button6图片位置 }
有向右移动的效果