窗体皮肤的使用 多样的窗体

使用皮肤可以使给人一个新鲜感觉,今天试着使用皮肤

1.创建一个windowfrom程序,以vs2010,为开发环境

 

2.添加引擎

 

在工具箱中添加IrisKin2就可以得到这个控件

3. 

 实例化,将其从工具箱中取出,直接放到窗口

4.将皮肤资源放在bin目录下面,(皮肤资源可以从网上找,有挺多的,ssk结尾的,当然也可以自己做)

 

5.后台代码使用

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TestSkin
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.skinEngine1.SkinFile = "MSN.ssk";
            TextBox.CheckForIllegalCrossThreadCalls = false;
        }
    }
}

 6.效果图

原文地址:https://www.cnblogs.com/wsfjlagr/p/3073832.html