zoukankan      html  css  js  c++  java
  • C# SkinCrafter 换肤控件的使用

    原创 C# SkinCrafter 换肤控件的使用收藏

    在网上SkinCrafter查找v3.3.3的破解后,使用他做了皮肤网上都说她功能比较强大。

    vs.net 2008创建.net2.0的应用程序(废话了,要是.net3.5就可以使用wpf)  

    //下面的步骤是skincrafter论坛的回复


    1. Open up the form designer and expand the toolbox. 
    2. Right click on the toolbox and hit "Choose Items". 
    3. Click browse and load the skincrafter.net DLL file. 
    4. A new control (SkinCrafter) will have appeared in the toolbox, drag it onto your form. 
    5. Try to load the skin from the properties panel. If you get an error like me: 
    6. Open up form.designer.cs (or in J#, just form.jsl). Expand every region and search for this.skinCrafter1.SkinFile = null. Replace it with this.skinCrafter1.SkinFile = "C:\\Path\\to\\file.skf"

    翻译:

    1、打开窗体设计器而且扩展工具栏(控件集合)

    2、在工具栏上点击右键菜单,点击“choose items”子菜单

    3、出现一个对话框,选择.NET Framework Compoents(默认),点击“Browse"按钮选择SkinCrafter安装目录下的(D:\Program Files\SkinCrafter3\SkinCrafterDemo\SkinCrafterDotNet\)skincrafter_.net2.0_vs2008.dll,

    4、工具栏多一个skincrafter控件按钮,将它拖到窗体上

    5、在属性对话框制定,制定SkinFile属性,选择皮肤文件

    6、启动程序即可。

    注意:以后无论添加的窗体不用上面的操作即可与添加的窗体相同的皮肤。

    但是有个遗憾:

    按照下面的他的帮助文件系的没有任何反映。

    C# // The code in CODE SECTION has to be called in Main() function, // before Application.Run() using DMSoft; ... DMSoft.SkinCrafter.Init(); /* ------------ Begin of CODE SECTION ------------- */ DMSoft.SkinCrafter SkinOb = new DMSoft.SkinCrafter(); SkinOb.InitLicenKeys("SKINCRAFTER","SKINCRAFTER.COM","support@skincrafter.com","DEMOSKINCRAFTERLICENCE"); SkinOb.InitDecoration(true); /* ------------ End of CODE SECTION ------------- */ SkinOb.LoadSkinFromFile("D:\\Skin.skf"); SkinOb.ApplySkin(); Application.Run(new Form1()); SkinOb.DeInitDecoration(); DMSoft.SkinCrafter.Terminate();

    请各位老大有相关经验指正,上面的代码如何使用。

    C#换肤使用USkin收藏

    最近的项目想做个漂亮的界面,开发工具使用vs.net 2008(上网查了一下发现支持vs.net2008的人很多,不过也有支持vs.net2005的,当然这只是IDE的选择.NET仍然选择2.0,使用了差不多2周的时间没有发现问题,本人刚刚使用C#还是菜鸟往往菜鸟的时候瞎弄容易将IDE搞死)

    USKin网上都说是个免费的换肤DLL,果真是这样不用注册码也可但是有无时间限制还没有做出判断。下面介绍一个使用的方法以及本人使用过程中遇到的问题。只介绍C# 。NET 2.0其他的不介绍,下面开始....

    1、在USkin的主页下载他的SDK,http://www.neemedia.com.当前的最新版本为3.0

    2、使用vs.net 2008创建一个Windows Forms Application程序。

    3、将USkin下载的开发包中的USkin.dll拷贝到刚刚创建项目的exe所在的文件夹。

    4、将皮肤(粉色可爱XP系统主题.msstyles)也拷贝步骤3的文件夹,注意我在此遇到过问题不显示皮肤由于路径错误导致USkinInit函数执行失败

    5、将开发包中的USkinSDK.cs文件添加到你的项目中,或者也可以按照下面的自己创建一个

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.Runtime.InteropServices;

    namespace USkin

    {

        class USkinSDK

        {

            public const string DLLNAME="USkin.dll";

            [DllImport(DLLNAME)]

            public static extern int USkinInit(string userName,string sn,string skinFileName);

            [DllImport(DLLNAME)]

            public static extern int USkinExit();

            [DllImport(DLLNAME)]

            public static extern int USkinLoadSkin(string skinFileName);

            [DllImport(DLLNAME)]

            public static extern int USkinRemoveSkin();

        }

    }

    6、修改static void Main()函数

    static void Main()

            {

                USkinSDK.USkinInit(null, null, "粉色可爱XP系统主题.msstyles");

                

                Application.EnableVisualStyles();

                Application.SetCompatibleTextRenderingDefault(false);

                Application.Run(new Form1());

                USkinSDK.USkinExit();

            }

    7、在窗体的Load函数中添加如下函数,如下

            private void Form1_Load(object sender, EventArgs e)

            {

                USkinSDK.USkinLoadSkin("粉色可爱XP系统主题.msstyles");

            }

    8、启动程序,程序果然换肤了。但是最大化以后发现界面只显示正常状态大小的皮图其他的透明。

    9、将窗体的IsMdiContainer属性设置为true,解决步骤8的问题

    这只是USkin简单的应用

  • 相关阅读:
    简单自定义控件在view下可以运行在传统模式下运行显示空白
    symbian菜单2运行时更换菜单实现右键菜单功能
    得到文件路径信息 TParse
    Symbian菜单:创建一个最简单的菜单
    RFs 目录操作
    作品[RFileRead/WriteStream 练习] for s60 fp2
    对话框的练习
    文件浏览工具s60第二版
    转描述符
    得到驱动器信息
  • 原文地址:https://www.cnblogs.com/xianyin05/p/1452344.html
Copyright © 2011-2022 走看看