How can I make my animation stop flicker!!!?!?!?
Can I do it in the same way as with DDRAW, where all the animations are done on the sec. buffer???
Could anyone give an example???
My code:
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





Reply With Quote