I tried to make a simple program to skin any window.. I used this code:
The code actually works, see the screenshot: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
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!




Reply With Quote