Click here to Skip to main content
15,861,125 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 295.2K   128   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
agdeniz17-May-09 20:47
agdeniz17-May-09 20:47 
GeneralMy vote of 1 Pin
Dave Kreskowiak30-Jan-09 10:07
mveDave Kreskowiak30-Jan-09 10:07 
GeneralForm Stretch problem Pin
Member 369554613-Jan-09 20:01
Member 369554613-Jan-09 20:01 
GeneralRe: Form Stretch problem Pin
aparsons67125-Oct-11 11:17
aparsons67125-Oct-11 11:17 
Generalsugestion Pin
ripsware7-Nov-08 3:43
ripsware7-Nov-08 3:43 
GeneralRe: sugestion Pin
Armando Airo'14-Nov-08 8:11
Armando Airo'14-Nov-08 8:11 
GeneralRe: sugestion Pin
wolf9s28-Jul-11 0:18
wolf9s28-Jul-11 0:18 
GeneralFlickering Problem! Pin
farizvi17-Jul-08 20:49
farizvi17-Jul-08 20:49 
The form flickers when it is dragged. Haven't you found any solution for it?
GeneralBug still there! Pin
sjcardinale12-Jun-08 10:37
sjcardinale12-Jun-08 10:37 
GeneralBug corrected Pin
Ferminus Muthu12-Jun-08 1:44
Ferminus Muthu12-Jun-08 1:44 
GeneralRe: Bug corrected Pin
Selvin12-Jun-08 2:18
Selvin12-Jun-08 2:18 
GeneralRe: Bug corrected Pin
mscdex12-Jun-08 6:04
mscdex12-Jun-08 6:04 
GeneralRe: Bug corrected Pin
wolf9s28-Jul-11 0:21
wolf9s28-Jul-11 0:21 
General[Message Removed] Pin
Mojtaba Vali25-May-08 0:50
Mojtaba Vali25-May-08 0:50 
GeneralSmall bug Pin
Selvin21-May-08 4:30
Selvin21-May-08 4:30 
Generalcool Pin
Abhijit Jana9-May-08 23:45
professionalAbhijit Jana9-May-08 23:45 
GeneralMoving the skinned form Pin
Kong Ragge6-May-08 23:58
Kong Ragge6-May-08 23:58 

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.