I'm experimenting with GDI+. Say I have a box and want it to move across the screen on a keypress. Do I have to clear the screen and redraw everything everytime I want to move the box? Or is there a way to just change the coordinates of the box?

Recommended Answers

All 4 Replies

Ok, so I figured out how to move objects, but the screen flashes and it looks very bad. Help?

Are you using WinForms? If so, turn on the DoubleBuffered property (select your form in the designer and select the cell next to DoubleBuffered on the right hand side, set it to true). I'm not sure how to do the equivalent in other platforms.

I'm not using MFC. I'm creating the window myself with pure code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.