Advertisement
ASP_Volume3 Graphics/ Sound #63866

Per-Pixel Alpha-Blended Clock

You may have seen other programs on the internet that offer programs with alpha-blended forms. An example would be Konfabulator, DesktopX, ObjectDock, just to name a few. What you may not have known is that you, too, can create great alpha blended forms easily using "layered windows". If you search PSC for "layered windows", you will find (besides this) a few programs that have transparent colors or that let you make an entire form one set amount of translucency. However, just being able to choose between making your entire form slightly translucent, or making one color transparent is rather limiting. What if you want to make a form that has a particular section partially translucent? What if you want to have your form anit-aliased on the edges? What about window shadows that fade away as they fall farther from the form? Now, with the included class, you can do this all and more. I built a fully functional clock application just as an example. First, I designed a few PNG files for the diferent faces of the clock. Since PNG files store alpha information, I created shadows and partially translucent parts in the PNG. Basically, at runtime, "hands" are drawn onto the image to complete the clock once every second. You can drag the clock around and even set it to stay on top of all windows. I wrote this with Visual Basic .NET 2005 Express. If you still have 2003 or below, you can download Visual Basic .NET 2005 Express for free from the MSDN site. I don't think the code will work on anything below 2005.

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
Upload
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine