using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DynamicButtonForm
{
public partial class Frm_Main : Form
{
public Frm_Main()
{
InitializeComponent();
}
private void button1_MouseMove(object sender, MouseEventArgs e)
{
button1.ImageAlign = ContentAlignment.MiddleLeft;//鼠标移动到button1时改变图片位置
}
private void button1_MouseLeave(object sender, EventArgs e)
{
button1.ImageAlign = ContentAlignment.MiddleCenter;//鼠标移动到button1时改变图片位置
}
}
}