I wrote a program that draws a specific situation of a board game(I think it's called "Ludo" in English). Now I can draw all the fields and the pawns etc., but if a pawn is moved I have to redraw that pawn. The problem is that the screen flashes for a very short time when I do this. This is probably because I first clear all fields and pawns, and then redraw them(I'm going to improve this, but the problem will, in smaller form, still occur I think), the screen is then flashing between the time I cleared everything until I redrawed everything. Is there a way to tell C# not to redraw even when I specifically call something like this.Controls.Clear()
until I tell it to?
I already tried it with this.SuspendLayout()
, because the name suggests it should do exactly this, but that doesn't work.