PDA

Click to See Complete Forum and Search --> : Screen flicker - drawing bitmaps directly to form


MikeyG
Dec 29th, 1999, 08:30 PM
Greetings,

I've seen a few emails similar to this one recently, but none have been drawing to the screen in the way that I am.

I am using the Draw method of the ImageList control to paint a picture directly to a form, at a refresh rate of ~50ms. I'm getting the tearing problem to do with the screen refreshing before the image is fully plotted - my question is, does anyone know of a way to wait for the screen refresh? Or is there another way around my problem?

------------------
Mike
Software Developer

MikeyG
Dec 30th, 1999, 06:22 AM
I've fixed it myself since posting...

As it was before, I had auto-redraw of the form set to false, and was doing all the painting of the form in form_paint.

What I have done now is to set the auto-redraw to true, and to ignore the form_paint event. I now explicitly do a CLS, re-paint the scene and THEN call Form.refresh

This seems to clear it up, as from the looks of things, VB buffers the display until the refresh is called... correct?