Click here to Skip to main content
11,812,712 members (73,313 online)
Click here to Skip to main content

Use the Free USkin Toolkit to Skin your Application

, 10 Nov 2008 CPOL 612.3K 32.7K 197
Rate this:
Please Sign up or sign in to vote.
USkin provides a free library and tools to developers for easily adding skins to their software UI.

The current version (V3.0 beta) does not need skinbuilder, the next version will provide one.

Sample Image


As we know, Windows XP adds support for themes for applications. When we change the Windows theme, all the Windows standard applications change into the same theme. How can we add skin support to our own software and make our software different from others? Here, I suggest a way: use the USkin toolkit.

Why USkin?

  1. Saves your development time. You don't have to care too much about your software UI. After finishing your functions, add three lines of code to support a skin. It's very easy, and will save you time.
  2. Makes your app look and feel goodSmile | :) , that's it.
  3. Supports color themes. This can make a skin file look like a 100 different skins. Save your UI design time.
  4. USkin provides a free version. Save your money!
  5. Free powerful SkinStudio included that you can use to design your own skin file.

USkin Features

  • Supports more than 20 Windows standard controls
  • Supports system standard dialogs, such as file dialogs, color dialogs, print dialogs
  • Supports custom defined controls/third party controls
  • Supports WYSIWYG style skin file editing
  • Supports MDI/SDI/Dialog style apps
  • Supports window blinds skin file importing. More than 10000 skin files can be used
  • Supports color themes
  • Supports VC/SDK/VB/.NET, no language limitations
  • Supports multithreading
  • Supports changing skin at runtime
  • Supports all popup menus, including the edit control context menu!
  • Only two lines required to add skin support
  • Supports all scrollbar skins
  • Small skin file size, around 30 KB

Using the Code

Using USkin functions is very easy. Let's begin.

First, include the USkin.h file in your app:

#include "uskin.h"

Then, in the InitInstance function, call USkinInit to initiate the USkin library:

BOOL CSDIApp::InitInstance()


    if (!AfxOleInit())
        return FALSE;
    // Init USkin lib and load media skin file
    SetRegistryKey(_T("Local App"));

    CSingleDocTemplate* pDocTemplate;
    pDocTemplate = new CSingleDocTemplate(
    if (!pDocTemplate)
        return FALSE;

    TCHAR sz[500];

    CCommandLineInfo cmdInfo;

    if (!ProcessShellCommand(cmdInfo))
        return FALSE;


    //if you want do your own subclass,call USkinInit here

    return TRUE;

In the end, call USkinExit before your app exits:

int CSDIApp::ExitInstance()
    return CWinApp::ExitInstance();

Using the Code in .NET

The sample code is in C#. You can easily change to other .NET languages. OK, let's begin. First add USkinSDK.cs to your project. Then in the Main entry, add one line of code like this:

//First Declare a skin object
	static void Main()
        USkinSDK.USkinInit("", "", "..\\Skins\\DiyGreen.msstyles");
		Application.Run(new Form1());

For skinning the Button (GroupBox, CheckBox, RadioButton) object correctly, you need to change the FlatStyle property into System.

The resulting screen will look like this:

Points of Interest

This article does not focus on the technical side of the implementation. If you want to know how it works, you can try these CodeProject articles:


  • Updates in version 3.0 beta [2008-11-10]
    • New render engine. I rewrote the core render engine such that it is faster, of high quality, and safer.
    • Added Microsoft Window's Theme file format (*.msstyles) support. The user does not need to convert or edit the skin file. There are many skin files to use.
    • Added Multi-Monitor support.
    • Fixed USkin2.2 known bugs.
    • Removed custom draw functions in this version because it was using the Microsoft theme file.
  • Updates in version 2.2 [2006-08-07]
    • Fixed the menubar update error.
    • Added the USkinUpdateMenuBar function. When the user modifies the menu by USkinGetMenu, the user should call USkinUpdateMenuBar to update the menubar.
    • Added RightToLeft text support.
    • Added Winamp like player sample.
    • USkin file format compatible.
    • Enhanced the SkinBuilder.
    • Added SkinBuilder Help document.
    • Added multilanguage support to SkinBuilder.
    • Enhanced ScrollBar control.
  • Updates in version 2.1
    • Fixed the MultiLine style in Button/CheckBox/RadioBox.
    • Added .NET skin support. Now you can use USkin with your .NET applications!
    • Added a new library called USkinCom. Easy for .NET use.
    • Added two C# samples. One is MDI, the other is SDI. You can see the power of USkin in these samples.
    • Added color replace feature. Now, you can replace standard system colors.
    • Enhanced the USkinApplyColorTheme function. Everything will change when calling the USkinApplyColorTheme function.
    • Added the USkinDrawFrameControl function to replace the standard DrawFrameControl.
    • Added six skin files to the pack. All skin files are carefully edited.
    • Enhanced many functions.

Special Thanks

  • Thanks to The Code Project for providing a good platform for developers
  • Thanks to you guys who use uskin
  • Thanks AlecJames - He found a multi-monitor bug. Sorry man, I took a long time to make v3.0


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
China China
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralUnable to register dll Pin
techiearc28-Oct-08 19:15
membertechiearc28-Oct-08 19:15 
GeneralRe: Unable to register dll Pin
thirdwolf9-Nov-08 15:43
memberthirdwolf9-Nov-08 15:43 
GeneralRE: Latest Version Pin
jberenguer19-Oct-08 14:17
memberjberenguer19-Oct-08 14:17 
GeneralRe: RE: Latest Version Pin
thirdwolf9-Nov-08 15:50
memberthirdwolf9-Nov-08 15:50 
GeneralRe: RE: Latest Version Pin
jberenguer10-Nov-08 7:49
memberjberenguer10-Nov-08 7:49 
GeneralRE: Transparency Pin
jberenguer23-Jul-08 14:13
memberjberenguer23-Jul-08 14:13 
GeneralRe: RE: Transparency Pin
thirdwolf24-Jul-08 20:04
memberthirdwolf24-Jul-08 20:04 
QuestionRE: Free? [modified] Pin
jberenguer5-Jul-08 8:49
memberjberenguer5-Jul-08 8:49 
AnswerRe: RE: Free? Pin
thirdwolf22-Jul-08 0:43
memberthirdwolf22-Jul-08 0:43 
GeneralRe: RE: Free? Pin
jberenguer22-Jul-08 16:03
memberjberenguer22-Jul-08 16:03 
QuestionProblem with reaction of modalless dialogs Pin
uripin9711-Jun-08 19:31
memberuripin9711-Jun-08 19:31 
AnswerRe: Problem with reaction of modalless dialogs Pin
thirdwolf3-Jul-08 17:13
memberthirdwolf3-Jul-08 17:13 
GeneralProblems with dual monitors Pin
AlecJames12-May-08 3:12
memberAlecJames12-May-08 3:12 
GeneralRe: Problems with dual monitors Pin
thirdwolf28-May-08 22:21
memberthirdwolf28-May-08 22:21 
GeneralThanks all the people Pin
thirdwolf8-May-08 20:16
memberthirdwolf8-May-08 20:16 
QuestionContext menu problem Pin
ojasmaru29-Apr-08 2:00
memberojasmaru29-Apr-08 2:00 
AnswerRe: Context menu problem Pin
thirdwolf8-May-08 20:15
memberthirdwolf8-May-08 20:15 
GeneralRe: Context menu problem Pin
ojasmaru15-May-08 0:31
memberojasmaru15-May-08 0:31 
QuestionC# version have some problem??? Pin
mohitscjain15-Nov-07 0:58
membermohitscjain15-Nov-07 0:58 
AnswerRe: C# version have some problem??? Pin
z00z09-May-08 10:21
memberz00z09-May-08 10:21 
AnswerRe: C# version have some problem??? Pin
jec22-May-08 23:02
memberjec22-May-08 23:02 
GeneralRe: C# version have some problem??? Pin
thirdwolf28-May-08 22:24
memberthirdwolf28-May-08 22:24 
AnswerRe: C# version have some problem??? Pin
lixiaohua01298-Sep-08 0:59
memberlixiaohua01298-Sep-08 0:59 
Generalproblem with menu Pin
kaynezhang4-Nov-07 22:04
memberkaynezhang4-Nov-07 22:04 
GeneralC# Examples are not working Pin
Sajal Mahajan16-Oct-07 23:06
memberSajal Mahajan16-Oct-07 23:06 
Questionhow to use? Pin
adnsk2-Oct-07 7:34
memberadnsk2-Oct-07 7:34 
QuestionDoes this work with VC8? Pin
AlecJames25-Jul-07 5:23
memberAlecJames25-Jul-07 5:23 
AnswerRe: Does this work with VC8? Pin
AlecJames25-Jul-07 6:27
memberAlecJames25-Jul-07 6:27 
GeneralErrors at runtime?! Pin
Van Ly Doc Hanh4-Jun-07 10:49
memberVan Ly Doc Hanh4-Jun-07 10:49 
GeneralGo mobile: skin support in WinCE/PocketPC apps [modified] Pin
dzolee16-May-07 23:06
memberdzolee16-May-07 23:06 
GeneralError in demo Pin
attecker00715-May-07 6:30
memberattecker00715-May-07 6:30 
GeneralHello ! Everyone [modified] Pin
aquwcw12345678913-Apr-07 3:59
memberaquwcw12345678913-Apr-07 3:59 
GeneralHelp A Bit Pin
mukuldhall8-Apr-07 19:45
membermukuldhall8-Apr-07 19:45 
GeneralRe: Help A Bit Pin
gdlinly24-Apr-07 22:32
membergdlinly24-Apr-07 22:32 
GeneralNice to meet compatriot here Pin
codeadair29-Mar-07 15:51
membercodeadair29-Mar-07 15:51 File Corrupt or Invalid Pin
trhalvorson20-Jan-07 4:08
membertrhalvorson20-Jan-07 4:08 
GeneralTAB problem Pin
TaborskyT18-Jan-07 19:47
memberTaborskyT18-Jan-07 19:47 
Generalmake a friend Pin
djwangping17-Dec-06 23:31
memberdjwangping17-Dec-06 23:31 
GeneralRe: make a friend Pin
thirdwolf22-Dec-06 0:02
memberthirdwolf22-Dec-06 0:02 
AnswerHi! Pin
spc012726-Feb-07 22:02
memberspc012726-Feb-07 22:02 
Questionhow to set office 2003 style using uskin ? Pin
flylin13-Dec-06 20:40
memberflylin13-Dec-06 20:40 
AnswerRe: how to set office 2003 style using uskin ? Pin
thirdwolf21-Dec-06 23:58
memberthirdwolf21-Dec-06 23:58 
QuestionBackground of "Open\Save file dialog" is 'black' ? Pin
asinro15-Dec-06 17:45
memberasinro15-Dec-06 17:45 
AnswerRe: Background of "Open\Save file dialog" is 'black' ? Pin
thirdwolf5-Dec-06 20:09
memberthirdwolf5-Dec-06 20:09 
GeneralRe: Background of "Open\Save file dialog" is 'black' ? Pin
asinro15-Dec-06 20:50
memberasinro15-Dec-06 20:50 
QuestionFree and Paid Pin
leonelsr3-Dec-06 9:43
memberleonelsr3-Dec-06 9:43 
AnswerRe: Free and Paid Pin
thirdwolf5-Dec-06 20:12
memberthirdwolf5-Dec-06 20:12 
GeneralRe: Free and Paid Pin
df4946-Apr-07 9:28
memberdf4946-Apr-07 9:28 
GeneralChinese help! Pin
Michael Chourdakis8-Nov-06 19:42
memberMichael Chourdakis8-Nov-06 19:42 
GeneralRe: Chinese help! Pin
thirdwolf20-Nov-06 17:00
memberthirdwolf20-Nov-06 17:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151002.1 | Last Updated 10 Nov 2008
Article Copyright 2006 by thirdwolf
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid