Results 1 to 14 of 14

Thread: How to skin other windows?

Threaded View

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    How to skin other windows?

    I tried to make a simple program to skin any window.. I used this code:
    Code:
        Dim DC As Long
        Dim hWnd As Long
        Dim Temp As Rect
        
        hWnd = Window(SelectedWindow).hWnd
        
        'Get rect
        GetClientRect hWnd, Temp
        DC = GetWindowDC(hWnd)
    
        'Setup rect
        Temp.Left = Temp.Left + 4
        Temp.Top = Temp.Top + 4
    
        Temp.Right = Temp.Right - Temp.Left + 4
        Temp.Bottom = Temp.Bottom - Temp.Top + 4
    
        'Copy picture
        With Temp: BitBlt DC, .Left, .Top, .Right, .Bottom, Front.hDC, 0, 0, vbSrcCopy: End With
    The code actually works, see the screenshot:


    However, can you help me with this?

    • How can I get the offset (4 in the example) from windows?
    • Any way to only paint into the BG of the window? (not over controls)
    • How to keep the picture there? (enabled "AutoRedraw" for that window)


    Thanks for ideas!
    Attached Images Attached Images  

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