Skip to main content
Email Password   helpLost your password?

Preview of the per pixel alpha blend effect

Preview of the per pixel alpha blend effect

Introduction

This is a port of my other article from C++/MFC to C#/Windows Forms. The concept of creating a per-pixel-alpha blending window remains the same, the GDI function UpdateLayeredWindow.

What changed

Usage

To use this code you need to include PerPixelAlphaForm.cs file in your project, create a class that inherits from PerPixelAlphaForm, load a bitmap using System.DrawingImage.FromFile static method and then call the PerPixelAlphaForm.SetBitmap method.

The example source code is inside the main.cs file. In the source code you will also find the new ways of doing the old things, like, handling dropped files from windows explorer.

Installing & Building

  1. Download and extract the source code of this article;
  2. To build, run the build.bat file from command prompt;
  3. Now, run the bin\main.exe and enjoy!

Changelog

31 May 2004

12 Feb 2002

Do you have any question or comment? Contact me!

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalsmall question Pin
nirishere
16:46 4 Sep '09  
GeneralAdd Controls Pin
Gottdrak99
13:23 19 Nov '08  
GeneralRe: Add Controls Pin
colche
20:52 25 Feb '09  
GeneralRe: Add Controls Pin
rbrender
18:44 9 Mar '09  
GeneralRe: Add Controls Pin
Marko Padjen
14:39 31 Mar '09  
GeneralExactly what I was looking for. Thanks. Pin
mlavenne
12:36 18 Aug '08  
GeneralGreat but can I use the function also for a control? Pin
it-bergmann
2:24 14 Feb '08  
GeneralRe: Great but can I use the function also for a control? Pin
Member 4202800
5:49 19 May '09  
Generalcool Pin
radioman.lt@gmail.com
23:20 12 Dec '07  
Generalwhy doing win32 with c#? Pin
bkaratte
21:46 11 Dec '07  
GeneralRe: why doing win32 with c#? Pin
tic84
14:12 10 Jun '08  
GeneralVB.Net Pin
dawmail333
23:47 24 Aug '07  
GeneralRe: VB.Net Pin
Dj Den4ik
0:05 12 Feb '08  
GeneralGreat!!!!!!!!!!!!! Pin
shp-coding
8:44 9 Aug '07  
GeneralWay to add some controls Pin
ihess
5:17 30 Jul '07  
GeneralRe: Way to add some controls [modified] Pin
Sp3cial
9:12 24 Aug '08  
GeneralHelp Pin
gsampath
21:15 28 May '07  
GeneralImage problem Pin
darb2
13:57 20 Apr '07  
GeneralRe: Image problem Pin
Daryl Fish
15:58 15 Jan '08  
GeneralProblem when changing the form parent to desktop with dual-monitoring [modified] Pin
Pim-Pom
2:59 7 Oct '06  
GeneralNice example, but... Pin
moebiusproject
10:35 12 Sep '06  
GeneralRe: Nice example, but... Pin
Tung Nguyen
18:37 15 Apr '07  
GeneralRe: Nice example, but... Pin
tic84
14:14 10 Jun '08  
GeneralProblem in design mode Pin
Capt'N Stabbin'
20:09 12 Jul '06  
GeneralRe: Problem in design mode Pin
ODaniell
1:52 3 Aug '06  


Last Updated 3 Jun 2004 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009