Results 1 to 9 of 9

Thread: animations

  1. #1

    Thread Starter
    Member mafia_geek's Avatar
    Join Date
    Jan 2002
    Location
    California
    Posts
    45

    Arrow animations

    whenever i animate an image it always flickers, is there a way to fix that?
    -mafia_geek-

    Condito, Ergo Sum

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Yea. Draw everything to an INVISIBLE picturebox (with AutoRedraw on), and then blit the entire picturebox (no CLS statement) onto a visible picturebox. Voila, no mess! Make sure to CLS the invisible picturebox, however.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    Member
    Join Date
    Feb 2002
    Posts
    45
    Cool !!!

    That's the info I always waited for !!!

    Anyway: I'm in trouble !
    The only thing I get when I try to copy a red line from one picturebox to another picturebox ( on the same form ) is a black square....

    Here's my code:
    Dim retval As Long
    Picture1.Line (0, 0)-(200, 300), RGB(255, 0, 0)
    retval = BitBlt(Form1.Picture2.hDC, 0, 0, 2772, 2772, Form1.Picture1.hDC, 0, 0, SCRCOPY)

    What am I doing wrong ???????????????????

    Any help woul be appreciated !
    Thanks !

    Tom

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Well you call Picture1.Line but then you call Form1.Picture1.hDC to get it's hDC... my suggestion to you is put Form1.Picture1.Line instead of just Picture1.Line.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Member
    Join Date
    Feb 2002
    Posts
    45
    Thanks for your help Sastraxi !

    I did as you told me, but there's no difference...

    Other idea ?!? ;-)

    Tom

  6. #6
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    Create a visible PictureBox with AutoRedraw set to true. CLS it and draw to it, and then to show changed contents to the screen, call .Refresh. When a picturebox is AutoRedraw, it stores its image offscreen, and only updates it when you call .Refresh, preventing flicker.
    "1 4m 4 1337 #4xz0r!'
    Janus

  7. #7
    Member
    Join Date
    Feb 2002
    Posts
    45
    Ok, it works now !

    I always forgot to initialize the value for SCRCOPY...
    ... how stupid !!

    Thanks guys !!!

  8. #8
    New Member
    Join Date
    Jan 2002
    Location
    glasgow
    Posts
    3
    why U got a picture of michael shuemacker mafia geek?????

  9. #9
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142
    Sastraxi
    Co-Captain of Team Canada

    CANADIANS UNITE! Join Team Canada in Kovan's "Compete Against the World"! We will crush opposition!
    hey Sastraxi, can i join even though i'm not canadian? what
    are you competing for? and who is Kovan?
    ؊Ϯϊ

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