VB Code:
Dim MovePic As Integer
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 Timer1_Timer()
Me.Cls
'Draws the mask with vbSrcAnd raster operation
BitBlt Me.hdc, MovePic, 0, picMask.ScaleWidth, picMask.ScaleHeight, picMask.hdc, 0, 0, vbSrcAnd
'Draws the sprite witht the vbSrcPaint raster operation
BitBlt Me.hdc, MovePic, 0, picSprite.ScaleWidth, picSprite.ScaleHeight, picSprite.hdc, 0, 0, vbSrcPaint
End Sub
Private Sub Timer2_Timer()
MovePic = MovePic + 2
End Sub