Results 1 to 3 of 3

Thread: Animated BitBlt

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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)
    Code:
        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
    Code:
    '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

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    So have 1 picbox and keep switching DC's?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width