VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Transparent Internet Explorer for 1 to 255

by Lio_Romania (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 9th October 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Transparent Internet Explorer for 1 to 255

API Declarations


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
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const WS_EX_TRANSPARENT = &H20&
Private Const LWA_ALPHA = &H2&

Rate Transparent Internet Explorer for 1 to 255



'Shell_TrayWnd
Private Sub Timer1_Timer()
    Dim lOldStyle As Long
    Dim bTrans As Byte ' The level of transparency (0 - 255)
    Dim LhWnd As Long
    
    LhWnd = FindWindow("IEFrame", vbNullString)
    bTrans = 225
        lOldStyle = GetWindowLong(LhWnd, GWL_EXSTYLE)
        SetWindowLong LhWnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED
        SetLayeredWindowAttributes LhWnd, 0, bTrans, LWA_ALPHA

End Sub

Download this snippet    Add to My Saved Code

Transparent Internet Explorer for 1 to 255 Comments

No comments have been posted about Transparent Internet Explorer for 1 to 255. Why not be the first to post a comment about Transparent Internet Explorer for 1 to 255.

Post your comment

Subject:
Message:
0/1000 characters