Yeah, you need two of the same image. One is the actual image with a black background, and the othe is the mask, which is the same image only with a white background and the image itself is all black. Then you do this:
VB Code:
Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
Const SRCPAINT = &HEE0086 ' (DWORD) dest = source OR dest
Const SRCAND = &H8800C6 ' (DWORD) dest = source AND dest
Const SRCINVERT = &H660046 ' (DWORD) dest = source XOR dest
Const SRCERASE = &H440328 ' (DWORD) dest = source AND (NOT dest )
Const NOTSRCCOPY = &H330008 ' (DWORD) dest = (NOT source)
Const NOTSRCERASE = &H1100A6 ' (DWORD) dest = (NOT src) AND (NOT dest)
Const DSTINVERT = &H550009 ' (DWORD) dest = (NOT dest)
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hsrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Sub Command1_Click()
BitBlt picDest.hdc, 0, 0, 60, 46, picMask.hdc, 60, 0, SRCAND
BitBlt picDest.hdc, 0, 0, 60, 46, picSprite.hdc, 60, 0, SRCPAINT
End Sub