VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Alphablended (Transparent) Windows

by Michael Barnathan (11 Submissions)
Category: Graphics
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

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.

Assumes
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

Rate Alphablended (Transparent) Windows

Download Alphablended (Transparent) Windows

Download Alphablended (Transparent) Windows (2 KB)

Alphablended (Transparent) Windows Comments

No comments have been posted about Alphablended (Transparent) Windows. Why not be the first to post a comment about Alphablended (Transparent) Windows.

Post your comment

Subject:
Message:
0/1000 characters