Click here to Skip to main content
15,513,489 members
Articles / Desktop Programming / Windows Forms
Posted 1 Nov 2007


20 bookmarked

PngSkin - Per Pixel Forms Skin

Rate me:
Please Sign up or sign in to vote.
2.83/5 (11 votes)
1 Nov 2007CPOL1 min read
PngSkin – ActiveX Control used to apply eye catching skins to Windows Forms with minimal code
Screenshot - Screen.gif


PngSkin is an ActiveX control written in Vb6 that can be used to apply per pixel alpha transparent PNG skin to any application (VB6 and .NET). You can ask your designer (Corel Draw) to create eye catching designs for your application. The control can be used for win2000 and upper operation systems. The non client area of any window can be designed in professional drawing software.

The best part of this control is that to use it in your application you need not code or configure it heavily. For VB6 Windows application, you need not write even a single line of code. For .NET Windows forms, you need to write just 2 lines of codes.

The Activex Control uses updatelayeredwindow (ULW) and setlayeredwindowattributes (SLWA) APIs to create a semi-transparent form capable of "hosting" controls. The word "hosting" is not correct. This example shows one way of creating a host form for controls and overlaying it on the semitransparent background.

Using the Code

For VB 6 Windows Forms

Add the component to your project and drag & drop to your form. Set form border to None and add some background colour.

Set the property ImageOuterPath = "your Png File Path" and run the project.

For .NET Windows Forms

Repeat the above procedure and add the following code to your Winform:

Private Sub PictureBox1_Click(ByVal sender As System.Object, _
	ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, _
	ByVal e As System.EventArgs) Handles MyBase.Load
    Me.BackgroundImage = Nothing
    With AxSkin1
    End With
End Sub

Points of Interest

To map the controls in design time, the control will set the background of form to PNG automatically in VB 6, however you need to set the forms background image to your PNG file.


Many many thanks to LaVolpe for sharing the PNG support in VB 6 [].


  • 2nd November, 2007: Initial post


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

Comments and Discussions

GeneralMy vote of 2 Pin
Member 101455208-Jul-13 6:38
Member 101455208-Jul-13 6:38 
QuestionDemo program could not run as expected Pin
sapperjiang27-Dec-11 22:36
sapperjiang27-Dec-11 22:36 
GeneralMy vote of 4 Pin
lilbucky7213-Nov-11 18:58
lilbucky7213-Nov-11 18:58 
GeneralMy vote of 1 Pin
Ashutosh Bhawasinka23-Jul-09 23:40
Ashutosh Bhawasinka23-Jul-09 23:40 
GeneralRE: Building demos Pin
jberenguer20-Oct-08 5:20
jberenguer20-Oct-08 5:20 
GeneralCenter screen a form ! Pin
Bigbermusa2-May-08 22:13
Bigbermusa2-May-08 22:13 
GeneralRe: Center screen a form ! Pin
kfgoh13-Jul-09 0:03
kfgoh13-Jul-09 0:03 

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.