Description: This project uses GDI+ to load a transparent .png and using UpdateLayeredwindows it displays the form using the png as the windows drawing source. Just try it, it's easier to see than describe. This can easily create some of the nicest forms that you are able to make. No more regions no more combining and xor'ing, using this you have a perfect antialiased non-rectangular form that you can see whats underneath through it. It's like regions supercharged. Though this example is pretty simple, I haven't seen this done anywhere on the net. I found one example in C++ using an outside library to load the png but using GDI+ is easier.
I made this example without anything except the basic code to load the png and display the form. It's always been easier (for me) to see an example when there isn't anything extra to dig through. As far as I know, GDI+ comes with windows 2000 and XP which fortunately is also the only OS's that support UpdateLayeredwindows. Have fun with it. Comments and Votes welcome.
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=55313&lngWId=1
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.