鼠标事件问题
请问:创建一个PictureBox并载入图片,当鼠标移动到图片上时,同样在这个PictureBox中显示另外一张图片,该怎么做?请各位高手指点
[解决办法]
写错了,不好意思
private void pictureBox1_MouseEnter(object sender, System.EventArgs e)
{
pictureBox1.Image = Image.FromFile(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)+ @ "\Image.gif ");
}
private void pictureBox1_MouseLeave(object sender, System.EventArgs e)
{
pictureBox1.Image = Image.FromFile(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)+ @ "\Image.jpg ");
}