Click here to Skip to main content
16,019,876 members
Articles / Desktop Programming / Windows Forms
Article

Adding custom skins for Forms in VB.Net

Rate me:
Please Sign up or sign in to vote.
4.52/5 (76 votes)
12 Jun 2008CPOL2 min read 303.2K   129   45
Custom skins for VB.NET forms, Skinning VB.NET forms, WinForm Skins

Introduction

In this project I have created an User control which can be used in Windows Form applications in VB.NET. Using this control you can add a New look to your Forms. I wont say this as a perfect code and method for adding skins, But there may be other ways which are better than this. I believe this as a simple way for adding skins to Win Forms.
Form-Skin.gif
Download Form_Skin.zip - 218.2 KB

Background

I was searching for some free skinner control to add for my Project. But I didnt find anything. Finally I got a small clue in a website to create skins. Thanks for that author. This control is fully made of panel controls. And I created the images for this skin in Photoshop. May or may not similar codes are available in the Code Project. Feel free to contact me for any suggestions about this control. You can get any help from me through e-mail.

Using the code

No special coding is needed for using this control. Just add the control in your Toolbox by Right clicking on the toolbox and selecting Choose Items and then Skinner.dll from the location you have stored. After this the Control is ready to use and you can drag and drop the control in the form to use this control. The Caption for the skinned form is read from the Form's text property. The icon is also taken from the icon which is set to the original form. The form's background is set to Transparent by using the Transparency key property. This will be set by the Skinner control. The following line shows this

Me.ParentForm.TransparencyKey = System.Drawing.Color.FromArgb(121, 121, 121)

Remember to set the Language of your code snippet using the Language dropdown.

History

This is the predecessor version for my Skin controls in VB.NET. 6 April 2008. You can expect for the updated version soon with lots of improvements and almost all functionalities of a form like changing the position of form by dragging the title bar.

License

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


Written By
Technical Lead Endeavour Software Technologies
India India
I am working as a Technical Lead in Bangalore. I started my development career using VB 6.0. I was interested in creating windows based applications. Later I worked on web based applications with ASP.Net. Now I am working in WCF web services for Iphone and Ipad applications.

Comments and Discussions

 
GeneralThanks Pin
Kashif Ahmad Khan21-Oct-15 17:49
Kashif Ahmad Khan21-Oct-15 17:49 
GeneralMantap, gan... Cendol lah... Pin
YanNdoet16-Sep-15 0:23
professionalYanNdoet16-Sep-15 0:23 
GeneralMy vote of 5 Pin
johnylee1920-Jan-14 6:44
johnylee1920-Jan-14 6:44 
GeneralRe: My vote of 5 Pin
DeJunk7-May-14 17:57
DeJunk7-May-14 17:57 
QuestionI like this Pin
conejo801-Sep-13 17:50
conejo801-Sep-13 17:50 
QuestionProblem with form as MDI container!!!.....don't work! Pin
robyzurieta6-Jun-13 2:27
robyzurieta6-Jun-13 2:27 
QuestionThanks Pin
Muslim Bahdili11-Apr-13 18:54
Muslim Bahdili11-Apr-13 18:54 
GeneralMy vote of 5 Pin
Jack_32115-May-12 1:21
Jack_32115-May-12 1:21 
GeneralMy vote of 5 Pin
CJ736-Mar-12 18:11
CJ736-Mar-12 18:11 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey19-Feb-12 23:24
professionalManoj Kumar Choubey19-Feb-12 23:24 
GeneralMy vote of 3 Pin
Swelihle30-Aug-11 23:15
Swelihle30-Aug-11 23:15 
QuestionExcellent idea Pin
jlkdaslkfjd22-Aug-11 0:36
jlkdaslkfjd22-Aug-11 0:36 
Generalform skinning Pin
TeddyW18-Jun-11 0:02
TeddyW18-Jun-11 0:02 
GeneralGreat article my friend! It helped me at.. Pin
TheRomanian18-Apr-11 4:17
TheRomanian18-Apr-11 4:17 
GeneralHelp Pin
steve02113-Apr-11 5:20
steve02113-Apr-11 5:20 
GeneralWhatsthishelpbutton Pin
Member 324988420-Sep-10 2:44
Member 324988420-Sep-10 2:44 
GeneralMy vote of 5 Pin
Freshbrew28-Aug-10 0:34
Freshbrew28-Aug-10 0:34 
GeneralProblem with window state at runtime Pin
usha gupta19-Jul-10 2:47
usha gupta19-Jul-10 2:47 
GeneralC# version and Thanks a Ton... Pin
Abhirash14-Feb-10 9:36
Abhirash14-Feb-10 9:36 
GeneralRe: C# version and Thanks a Ton... Pin
Ferminus Muthu7-Mar-10 22:39
Ferminus Muthu7-Mar-10 22:39 
GeneralRe: C# version and Thanks a Ton... Pin
Priya Billava30-Mar-10 18:57
Priya Billava30-Mar-10 18:57 
GeneralSomething More Challenging... Pin
Joshua Eiland13-Feb-10 19:37
Joshua Eiland13-Feb-10 19:37 
This works very well, and does a great job, too!

Now could we develop it enough to skin message boxes as well? That may be out of this control's scope, though.
GeneralRe: Something More Challenging... Pin
Ferminus Muthu7-Mar-10 22:38
Ferminus Muthu7-Mar-10 22:38 
GeneralMy vote of 1 Pin
seinkraft24-Jan-10 5:32
seinkraft24-Jan-10 5:32 
Generalhi..... gr8 stuff Pin
Arunabh Nag22-Jul-09 12:30
Arunabh Nag22-Jul-09 12:30 

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

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