Glitchy Images

Danjb
10-12-2009, 11:52 AM
Hey,

I've noticed in VB that moving graphics have a tendancy to mess up which can really ruin an otherwise great program. By this I mean you can see black lines all over them or they'll flicker and become black squares, etc. It happens really fast, so it's not like it just turns into a giant square for ages but it will flash black, etc. The problem is especially apparent when images are scaled.

Hope that makes sense.

I was wondering how this can be fixed?

Thanks,

- Danjb

Iceplug
10-12-2009, 01:46 PM
Well, there's always the option of drawing the graphics yourself.

BillSoo has an example of how you can make a tile map with BitBlt APIs, however, you should be comfortable with using native VB6 commands before going in to API - simplify your goals before you try to make things more robust.

7965

vb5prgrmr
10-12-2009, 09:04 PM
What you need to search for/look up/do is to create a "double buffer" (which basically means, do all operations to the image in memory before showing image).



Good Luck

Danjb
10-17-2009, 04:35 AM
Eek... a double buffer seems like the kind of thing I need but it looks way too complicated for something so simple :(

vb5prgrmr
10-17-2009, 05:20 AM
No, not really. For the most part if you are using a picturebox and using various drawing methods to it, all you need to do is to is to use a second picturebox (visible = false). Do all your drawing methods and then set picture1's picture to picture2's or for that matter you could do the same with a stdPicture object/variable.



Good Luck

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum