Drawing lots of images quickly with for statment
Hi,
The code below draws anywhere from 1 to 75 of these images one after another,
its basically like with itunes and wmp where you have the lines / green bit on the bit that shows you how much song has played.
VB Code:
For i As Integer = 4 To CType(((Pos * MyBase.Size.Width) / 100) - 4, Integer) Step 2
MyBase.CreateGraphics.DrawImage(My.Resources.track_lines, i, 0, My.Resources.track_lines.Width, My.Resources.track_lines.Height)
Next
I need a better way to do this because at the moment whenever they change they jitter and flash.
Thanks for your help,
Cheers,
Gussy
Re: Drawing lots of images quickly with for statment
Are you drawing directly on the form, or on a control? Whichever it is, you might be better off trying to draw to a bitmap object in memory, then drawing the finished image once.
Bill
Re: Drawing lots of images quickly with for statment
a.k.a. draw all to backbuffer, draw backbuffer to screen.