Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Posts
    23

    set Window transparency!

    hello everybody
    i want to change my applications transparency
    i know i need to call a function named "SetLayeredWindowAttributes"
    in "user32.dll"
    and also i have these informations about this Function
    -=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    (Parameters)
    Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    -=-=-=-=-=-=
    · hwnd
    [in] Handle to the layered window. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.
    · crKey
    [in] Pointer to a COLORREF value that specifies the transparency color key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. To generate a COLORREF, use the RGB macro.
    · bAlpha
    [in] Alpha value used to describe the opacity of the layered window. Similar to the SourceConstantAlpha member of the BLENDFUNCTION structure. When bAlpha is 0, the window is completely transparent. When bAlpha is 255, the window is opaque.
    · dwFlags
    [in] Specifies an action to take. This parameter can be one or more of the following values.
    LWA_COLORKEY
    Use crKey as the transparency color.
    LWA_ALPHA
    Use bAlpha to determine the opacity of the layered window..

    =-=-=-==-=-=-=-=-=-=-=-=---=-===-=-=-==-=-=-=-=-=-=-
    (vb Example)
    Const LWA_COLORKEY = &H1
    Const LWA_ALPHA = &H2
    Const GWL_EXSTYLE = (-20)
    Const WS_EX_LAYERED = &H80000
    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 crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    Private Sub Form_Load()
    'KPD-Team 2000
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim Ret As Long
    'Set the window style to 'Layered'
    Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
    Ret = Ret Or WS_EX_LAYERED
    SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
    'Set the opacity of the layered window to 128
    SetLayeredWindowAttributes Me.hWnd, 0, 128, LWA_ALPHA
    End Sub
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


    the problem is "i don't know how to use it in AMS"
    can you help me?

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959

  3. #3
    Join Date
    Jan 2006
    Posts
    23

    thanks a lot!

    i don't know how i can appreciate your help
    thank u again!

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    You're welcome. Good luck

Similar Threads

  1. Example: Set Window Mask
    By Adam in forum AutoPlay Media Studio 7.5 Examples
    Replies: 0
    Last Post: 09-15-2005, 12:44 PM
  2. Creating a Non-Rectangular Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 12:40 PM
  3. Using the Status Dialog Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:52 PM
  4. HOWTO: Get the Position and Size of a Window
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-27-2002, 09:40 AM
  5. INFO: How to Set the Default Application Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts