Results 1 to 2 of 2

Thread: delete color

  1. #1

    Thread Starter
    New Member RothHear's Avatar
    Join Date
    Oct 2005
    Posts
    13

    Unhappy delete color

    hello

    i have a form i set the borders to none
    and i put a background picture and it has 2 colors red and blue i would like to delete the blue so u can see through it and see your desktop i have had the code at one time but i lost it any help wold be great
    One Truth Will Proval

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: delete color

    VB Code:
    1. Private Declare Function SetLayeredWindowAttributes Lib "user32" ( _
    2.     ByVal hWnd As Long, _
    3.     ByVal crKey As Long, _
    4.     ByVal bAlpha As Byte, _
    5.     ByVal dwFlags As Long _
    6. ) As Long
    7.  
    8. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
    9.     ByVal hWnd As Long, _
    10.     ByVal nIndex As Long, _
    11.     ByVal dwNewLong As Long _
    12. ) As Long
    13.  
    14. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
    15.     ByVal hWnd As Long, _
    16.     ByVal nIndex As Long _
    17. ) As Long
    18.  
    19. Private Const WS_EX_LAYERED = &H80000
    20. Private Const GWL_EXSTYLE = (-20)
    21. Private Const LWA_COLORKEY = &H1
    22.  
    23. Private Sub Form_Load()
    24.     Dim nStyle As Long
    25.    
    26.     nStyle = GetWindowLong(Me.hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
    27.     Call SetWindowLong(Me.hWnd, GWL_EXSTYLE, nStyle)
    28.     Call SetLayeredWindowAttributes(Me.hWnd, vbBlue, 0, LWA_COLORKEY)
    29. End Sub

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