第一、引用IrisSkin2.dll组件
说明:IrisSkin2.dll是一个第三方组件
第二、代码
public partial class Form1 : Form
{
Sunisoft.IrisSkin.SkinEngine se = null;
public Form1()
{
InitializeComponent();
se = new Sunisoft.IrisSkin.SkinEngine();
se.SkinAllForm = true; // 这句话是用来设置整个系统下所有窗体都采用这个皮肤
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
se.SkinFile = "skin/SteelBlack.ssk"; // 选择皮肤
}
private void button2_Click(object sender, EventArgs e)
{
se.SkinFile = "skin/MSN.ssk"; // 选择皮肤
}
private void button3_Click(object sender, EventArgs e)
{
se.SkinFile = "skin/MP10.ssk";
Form2 f = new Form2();
f.Show();
}
}