TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
schmintan
NA
64
0
drawing everything before drawing to the screen
Mar 1 2005 5:51 AM
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); }
Reply
Answers (
5
)
severe flicker when creating moving image on a panel
Directx9.0b SDK for c# + MS Visual Studio .Net 2003