CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: flickering

  1. #1
    Join Date
    Mar 2000
    Posts
    29

    flickering

    i'm making an animation by bitblting to a picture box. however, i have labels on the picturebox to label certain parts of the animation. this is unfortunate because the labels are flickering very badly as the program is drawing to the picture box. how can i get rid of the flickering? thanks for any help.


  2. #2
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: flickering

    I don't think you can....However you could try some other method of "animation"

    Programs and requests for them for FREE.
    http://falstok.fly.to

  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: flickering

    VB's way of deciding if a label needs to be painted or not is not that clear, and a lot of other places also, constant changing of captions etc brings a lot of flicker. From your post it is not clear if the caption i also changing... Anyway you can try (1) : Make the labels transparent, i.e bg is see-thru, only portions obscured be the letter are not seen.
    2. Make the Picture box Autoredraw, and try to write into the picturebox with Print command.
    if making AutoRedraw has adverse effect on your animation, then you should write /redisplay the captions everytime after each frame display.


    RK

  4. #4
    Join Date
    Jul 1999
    Posts
    104

    Re: flickering

    What you can try to do is create an immage in memory, paint everything on that immage, including the labels (still in memory) and then show that immage.
    If you repeat this x times per second you have an animation.

    I used this when I needed to create an animation in Java and it worked fine.
    I didn't used a picturebox or something, but just showed the immage directly. The controls on the screen weren't affected by this immage, so it could be you don't have to paint them on the immage.

    If you wan't I can send you the java source code from my program


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

Featured