Click to See Complete Forum and Search --> : flickering
Viper X
March 20th, 2000, 04:15 PM
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.
AndyK
March 20th, 2000, 09:04 PM
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
Ravi Kiran
March 20th, 2000, 11:28 PM
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
freek
March 21st, 2000, 06:09 AM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.