Declare Function BitBlt Lib "gdi32" Alias "BitBlt" _
(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 Public Const SRCAND = &H8800C6 Public Const SRCCOPY = &HCC0020 Public Const SRCPAINT = &HEE0086 'es. Success = bitblt(frmmain.hdc,100,100,50,50,pic1.hdc,0,0,SRCAND) Success = bitblt(frmmain.hdc,100,100,50,50,pic2.hdc,0,0,SRCPAINT) The two pictures should be identical except the first should have areas where you want the background to show throught displayed as white and the second black Bitblt the first using SRCAND then Bitblt the second over the first using SRCPAINT and there you are, the background will show through. |