First, I'll start out with an example of PaintPicture. Before you use the Code, make sure there is an ImageBox and a Timer on the Form.
Insert this code into the Timer.
Code:
Private Sub Timer1_Timer()
' Clear the screen
Cls
Static X, Y
' Add 10 to each variable
X = X + 10
Y = Y + 10
' Paint the Image on the Form.
PaintPicture Image1.Picture, X, Y, Image1.Width, Image1.Height
End Sub
Now we will move on to BitBlt. What you need is a Form with a 2 PictureBox's and a Timer.
Code for module.
Code:
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
Now, you must create the Images for each PictureBox. 1 Image will be you original image and the other will be your Mask. A mask is exactly the same as your image, but the background is coloured white and your image is all black.
Now put this code in your Timer.
Code:
Private Sub Timer1_Timer()
Cls
Static x, y
x = x + 10
y = y + 10
' First lay on the mask.
BitBlt Form1.hDC, x, y, picMask.Width, picMask.Height, picMask.hDC, 0, 0, SRCAND
' Now lay on the picture.
BitBlt Form1.hDC, x, y, Picture1.Width, Picture1.Height, Picture1.hDC, 0, 0, SRCPAINT
End Sub
Hope this helps.