控件(破解版,只限.net2005)和皮膚下載地址:http://www.cnblogs.com/liuxzh1026/archive/2006/08/19/480981.html
嵌入在項目中:
將下載的皮膚文件和irisskin2.rar解壓,在項目中添加現有項,將皮膚文件添加進項目;將irisskin2.dll引用進項目。皮膚文件屬性中的“生成操作”改為嵌入的資源。引用的irisskin2.dll屬性中的“復制本地”改為true。
在代碼中添加枚舉:
public enum skintype
{
calmness,
deepcyan,
eighteen,
emerald,
glassbrown,
longhorn,
macos,
midsummer,
mp10,
msn,
oneblue,
page,
realone,
silver,
sportsblack,
steelblack,
vista1,
vista2,
warm,
wave,
xpsilver
}
添加調用方法:
public static sunisoft.irisskin.skinengine se=null;
public static void changeskin(skintype st)
{
system.reflection.assembly thisdll = system.reflection.assembly.getexecutingassembly();
if (se == null)
{
se = new sunisoft.irisskin.skinengine(application.openforms[0], thisdll.getmanifestresourcestream("alldj.skin." + st.tostring() + ".ssk"));
se.active = true;
for (int i = 0; i < application.openforms.count; i++)
{
se.addform(application.openforms);
}
}
else
{
se.skinstream = thisdll.getmanifestresourcestream("alldj.skin." + st.tostring() + ".ssk");
se.active = true;
}
}
public static void removeskin()
{
if (se == null)
{
return;
}
else
{
se.active = false;
}
}
調用changeskin方法換膚,調用removeskin方法恢復系統默認皮膚。