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

Related posts:

  1. How to Display an image on the current form, zooming it by a factor of 4 along the X-axis, and 8 along the Y-axis.
  2. How to get Dimensions of an image
  3. How to Capture the Screen
  4. How to Spin a Picture
  5. How to display animated Gif in your program
  6. How to set background picture for form (like the background image of a HTML Document)
  7. How to stretch image in a Picture Box Control
  8. How to Execute an ad hoc query using ADO and display the results in a grid
  9. How to make text on a form scroll upward.
  10. How to Simulate Alt+PrintScreen to capture an image of a window in the clipboard

Filed under: Graphics Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.