PDA

Click to See Complete Forum and Search --> : Animated BitBlt


SteveCRM
Oct 19th, 2000, 06:22 PM
Fox's demo is a little to complicated so Im going to try by myself for a little bit...would something like this work? (If i used getTickcount to slow it down of course)

BitBlt BackDC, Guy1.x, Guy1.y, Guy1.w, Guy1.h, Guy1.DC, Guy1.w, 0, vbSrcPaint 'The mask
BitBlt BackDC, Guy1.x, Guy1.y, Guy1.w, Guy1.h, Guy1.DC, 0, 0, vbSrcAnd 'Guy1

BitBlt BackDC, Guy2.x, Guy2.y, Guy2.w, Guy2.h, Guy2.DC, Guy2.w, 0, vbSrcPaint 'The mask
BitBlt BackDC, Guy2.x, Guy2.y, Guy2.w, Guy2.h, Guy2.DC, 0, 0, vbSrcAnd 'Guy2


and then kind of have my main picture switch between these 2? Kind of like this

'this isn't correct keydown stuff but you know what I mean
if keycode = vbkeyright then
player.picture = guy1 'i've already blted player1
end if
if keycode = vbkeyleft then
player.picture = guy2
end if

thanks guys :)

HarryW
Oct 19th, 2000, 07:56 PM
Wouldn't it be better to have two pictureboxes (or even better memory DCs) and just switch the DC in the BitBlt function? I have a feeling that might be quicker.

SteveCRM
Oct 19th, 2000, 08:58 PM
So have 1 picbox and keep switching DC's?