Re: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- From: "Mike Williams" <mikea@xxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Dec 2007 17:30:14 -0000
"Frank Moyles" <fgmoyles@xxxxxxxxxx> wrote in message news:wMydncOyocwrHvfaRVnyhAA@xxxxxxxxx
I have a PictureBox placed on a form, as well as a horizontal
scroll bar. I am drawing a graph (output from an instrument)
on the PictureBox. I am 'scrolling' the graph by dragging the
horizontal scroll bar. Each time the scroll bar changes, I am
getting the new values and using that event to redraw the
graph - it works in theory, but in practise, it flickers quite a lot.
Try drawing into a backbuffer first. One very easy way of doing this is to simply set the Autoredraw property of the PictureBox to True, which will eliminate the flicker. You might also like to try speeding up the drawing of your graph lines using the PolyLine API instead of drawing the individual lines one by one (if that is what you are currently doing).
Mike
.
- Follow-Ups:
- Re: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- From: Frank Moyles
- Re: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- References:
- Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- From: Frank Moyles
- Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- Prev by Date: OT Re: VB6 vs Vista
- Next by Date: Re: Checkbox graphical style: what oddity it is?
- Previous by thread: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- Next by thread: Re: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
- Index(es):
Relevant Pages
|