Results 1 to 2 of 2

Thread: SetLayered..() When SetParent() has been used

  1. #1

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172

    SetLayered..() When SetParent() has been used

    I'm trying to get the SetLayeredWindowAttributes() function to make my form semi-transparent after i've changed the parent of the form to GethWndByWinTitle("Program Manager"), but without success.
    Here's the part of my code which does this:
    Code:
    Dim DeskH As Long
    Dim nullRect As RECT
    Dim lret As Long
    
    'Set parent of form to make it stay on bottom
    DeskH = GethWndByWinTitle("Program Manager")
    Call SetParent(frmMain.hWnd, DeskH)
    
    'Set layered window attributes
    lret = GetWindowLong(frmMain.hWnd, GWL_EXSTYLE)
    lret = lret Or WS_EX_LAYERED
    SetWindowLong frmMain.hWnd, GWL_EXSTYLE, lret
    SetLayeredWindowAttributes hWnd, RGB(255, 0, 255), 200, LWA_COLORKEY Or LWA_ALPHA
    Does anyone know how to make this work?
    Thanks in advance.


  2. #2

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172
    any ideas?


Posting Permissions

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



Click Here to Expand Forum to Full Width