WinForm form skinning is easily implemented in. NET vs2010 using IrisSkin2.dll
reproduced
Hello everyone, engaged in c-s development of C # programmers often for WinForm interface design distress, I was also deeply "art myth" of the harm, now mention art, interface layout design began to egg pain ....
Fortunately, the author accidentally contacted some of the more lovely third-party controls, can save our programmers a lot of artists above the trouble ... In a succession of blog I will introduce to you, today our theme is: IrisSkin2.dll
IrisSkin2.dll is a very good free skin control, it can be easily implemented WinForm form peels!
Online a lot of friends said in the VS2010 can not use IrisSkin2.dll, I here provide a trickery method.
IrisSkin2.dll is currently available only in. NET Faremwork 4.0 and earlier, so you can set your project framework to. NET. NET Faremwork 4.0 in VS2010, as described in:
Right-click the item you created--Properties:
Change your target framework to. NET Faremwork 4.0 or earlier
OK, this setting, you can use the IrisSkin2.dll control in your VS2010 project, the next step to achieve the skin-changing function only a few steps, very simple!
First of all, the most needed, of course, is to download the IrisSkin2.dll control, here for everyone to post the address of the CSDN download area:
http://download.csdn.net/source/1465571
After downloading, we formally enter WinForm's skin-changing journey ...
1. Add the IrisSkin2.dll file to the current project reference (add Reference, right-by reference, current project, Solution Explorer, Locate the IrisSkin2.dll file.) The IrisSkin2.dll file is best placed in the current project \bin\debug file.
2. Then add the IrisSkin2.dll file to the vc2005 Toolbox: Right-click, select Item, browse to find the IrisSkin2.dll file (preferably in the current project \bin\debug file) as determined, The control is added to the toolbox. Then drag the newly added Skinengine control in the Toolbox into the current project.
The IrisSkin2.dll associated skin style file is a suffix named SSK file that you can copy to the current project \bin\debug file for easy loading of the program.
Use the following code in your project:
This.skinengine1.skinfile= "Diamondblue.ssk";
To compare style distinctions, I put buttons, labels, groubox and other controls on the form forms to see the difference between different skin styles:
void Calmnesstoolstripmenuitem_click (object sender, EventArgs e)
2: {
"Calmness.ssk";
"Calmness style effect";
5:}
void Deepcyantoolstripmenuitem_click (object sender, EventArgs e)
8: {
"Deepcyan.ssk";
"Deepcyan style effect";
11:}
void Eighteentoolstripmenuitem_click (object sender, EventArgs e)
14: {
"Eighteen.ssk";
"Eighteen style effect";
17:}
void Msntoolstripmenuitem_click (object sender, EventArgs e)
20: {
"Msn.ssk";
"MSN Style effect";
23:}
void Silvertoolstripmenuitem_click (object sender, EventArgs e)
26: {
"Silver.ssk";
"Silver style effect";
29:}
void Sportsblacktoolstripmenuitem_click (object sender, EventArgs e)
32: {
"Sportsblack.ssk";
"Sportsblack style effect";
35:}
void Vista2toolstripmenuitem_click (object sender, EventArgs e)
38: {
"Vista2.ssk";
"Vista2 style effect";
41:}
void Xpsilvertoolstripmenuitem_click (object sender, EventArgs e)
44: {
"Xpsilver.ssk";
"Xpsilver style effect";
47:}
IrisSkin2.dll control the implementation of the skin is so simple, surprised Ah, marvel it. Oh. Here's a look at the form after the skin change
Style of the Diamondblue.ssk file
Style of the Msn.ssk file
Style of the Vista2.ssk file