Alphablended (Transparent) Windows
Posted: 2002-06-01
By: ArchiveBot
Viewed: 70
Filed Under:
Title | Uploaded | Size |
---|---|---|
Alphablend503261212002.zip | 9/3/2020 3:45:00 PM | 2,541 |
This code will demonstrate how to create a window with partial transparency. The color of the window and the amount of transparency (in percent, from 0 to 100% transparent) are customizable. The code involves no screen capturing, it is actually an alphablended window. The window contents update in realtime as the window is moved, sized, or manipulated in any way. This only works in Windows 2000/XP.
Original Author: Michael Barnathan
Assumptions
This code only works in Windows 2000 or Windows XP. Expect all new versions of windows that come out to support this later on.
API Declarations
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crey As Byte, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.