控件(破解版,只限.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方法恢复系统默认皮肤。
嵌入在项目中:
将下载的皮肤文件和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方法恢复系统默认皮肤。
关键字词: