CodeItBetter Programming Another VB Programming Blog

How to Display an image onto a hDC with transparency

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
'Graphics - How to Display an image onto a hDC with transparency
Option Explicit
 
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 cmdBitBlt_Click()
    BitBlt picFinal.hDC, 0, 0, 136, 109, picMask.hDC, 0, 0, vbSrcPaint
    BitBlt picFinal.hDC, 0, 0, 136, 109, picOriginal.hDC, 0, 0, vbSrcAnd
End Sub
Filed under: Graphics Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.