Beautify the form in C # WinForm--easily irisskin with a skin-changing function

Source: Internet
Author: User

IrisSkin2.dll is a great free skin control that makes it easy to implement WinForm forms but IrisSkin2.dll can only be used in. NET faremwork 4.0 and earlier, So to use it in VS2010, you need to set your project framework to. NET Framework 4.0, and another way is to use IrisSkin4.dll, whose usage and IrisSkin2.dll are basically exactly the same.

First, download the IrisSkin4.dll on the Internet (packaged with the skin), copy the IrisSkin4.dll with skins (skin) to the \Bin\Debug folder of the project

Second, right-click on "References" in the program's Explorer, select "Add Reference", locate the IrisSkin4.dll file you just copied, and click "OK".

Three, "Tools"-"SELECT toolbox item--". NET Framework Components "-" Browse "-Find irisskin4.dll--> click" OK ", skinengine control to the Toolbox

Iv. Add the control to the main form of the program and edit the following line of code in the main form's constructor to select the skin to complete the rendering

" \\Skins\\ The selected skin name (suffix. SSK) ";  // Select Skin File

The effect of using IrisSkin4.dll is limited, sometimes it renders us crazy (for example, I used a sportsblue skin, and then found that although the skin style I like, but in its rendering under the form of the button is very low), then we want to customize their own dissatisfied with the control Instead of needing the skin to render these controls, simply add the following line of code:

9999;      // set the control that does not need to be rendered tag value is 9999 

You can then display the control's custom style by setting the Tag Value property of the control that does not need to be rendered to 9999.

Source: Http://www.tuicool.com/articles/Q3euaa

========================================================================================================

Recently do some C # database development projects, the basic form of the program, found that the interface is ugly, however, they are not good at art, so think of the third party to help. There are more on the Internet is the use of IrisSkin2.dll files to develop, and then, I follow some solutions to do down, found that the link library is not suitable for VS2010 platform development of WinForm, therefore, to find alternative solutions, and then found that the IrisSkin4.dll more appropriate to complete the beautification work. To synthesize the practices of others, I do the following:

1. Import the IrisSkin4.dll dynamic file into the current project reference. To do this, add a reference to the right-click, reference, current project, Solution Explorer, locate the IrisSkin4.dll file, and then join. It is advisable to put the IrisSkin4.dll file in the current project \bin\debug file.

2. Then add the IrisSkin4.dll file to the VS2010 Toolbox: View, Toolbox, right-click Options, browse to find the IrisSkin4.dll file (the file is best placed in the current project \bin\ Debug file) as determined, the control is added to the toolbox, and the newly added Skinengine control in the toolbox is dragged into the current project.

3. Copy the. ssk file from the skin directory into the current project \bin\debug file, andthe SSK file can be selected on demand.

4. Then call the. SSK skin file in the project. Cases:

corresponding to the MainForm window of the main program MainForm.Designer.cs, the private Sunisoft.IrisSkin.SkinEngine SkinEngine1 is declared first, and then the InitializeComponent () (Windows Form designer-generated code) definition

?
this.skinEngine1 = newSunisoft.IrisSkin.SkinEngine(((System.ComponentModel.Component)(this)));  

Finally, the definition of the function is constructed in the MainForm.cs file:

?
this.skinEngine1.SkinFile = Application.StartupPath + "//DiamondBlue.ssk";

At the same time, in order to ensure that the other forms also have a corresponding effect, then in the mainform corresponding to the constructor, add the following code:

?
1     Sunisoft.IrisSkin.SkinEngine se = null;
    se =
newSunisoft.IrisSkin.SkinEngine();  
   se.SkinAllForm =
true;

  

Source: http://www.cnblogs.com/zhaoxiaoming/archive/2012/07/25/Form_Beautify.html

Beautify the form in C # WinForm--easily irisskin with a skin-changing function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.