Click here to Skip to main content
15,885,651 members
Articles / Desktop Programming / Windows Forms

An Alpha Channel Composited Windows Form with Designer Support

Rate me:
Please Sign up or sign in to vote.
4.96/5 (124 votes)
5 Oct 2009CPOL8 min read 323K   48.8K   279  
An alpha channel composited form for image based Window frames
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestFormSkinChange
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void skinButton2_Click(object sender, EventArgs e)
    {
      Bitmap bmap = TestFormSkinChange.Properties.Resources.skin2;
      alphaFormTransformer1.UpdateSkin(bmap,null,255);
    }

    private void skinButton1_Click(object sender, EventArgs e)
    {
      Bitmap bmap = TestFormSkinChange.Properties.Resources.skin1;
      alphaFormTransformer1.UpdateSkin(bmap,null,255);
    }

    private void Form1_Load(object sender, EventArgs e)
    {
      alphaFormTransformer1.TransformForm(255);
    }

    private void closeButton_Click(object sender, EventArgs e)
    {
      Close();
    }
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer
United States United States
Jeff Anderson has been a computer graphics software developer for over twenty years.

He is a co-founder of Braid Art Labs and a developer of Braid's GroBoto 3D software. Jeff also dabbles in shareware with an expanded version of the AlphaForm control and other programs here.

Comments and Discussions