Drawing everything before drawing to the screen
i have created my own draw method to draw moving items to the screen. this is run from inside a thread. i get awaul flicker, which can be kinda controlled by adjusting the sleep time of the thread, but this is not fully effective. is there anyway to draw the full image to something ( a bitmap or some image object) before drawing this to the form?
i dont think the built in doubble buffering is working as im not using the Form_OnPaint() method.
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
any ideas on how to completely rid myself of flicker. heres my paint method.
private void DrawToScreen(Graphics g)
{
g.FillRectangle(Brushes.Cyan,1,1,this.Width,this.Height);
foreach (Wall w in this.walls)
{
w.DrawWall(g);
}
crowd.DrawToScreen(g);
}

flyinglogic2 reputationPosted Mar 9, 2005, 9:28 AM EST
schmintan63 reputationPosted Mar 14, 2005, 11:10 AM EST
schmintan63 reputationPosted Mar 15, 2005, 12:52 AM EST
bilnaadRank #2,169 · 655 reputationPosted Mar 29, 2005, 7:17 AM EST
bilnaadRank #2,169 · 655 reputationPosted Mar 29, 2005, 7:18 AM EST