The example Make silly eyes that track the mouse in C# shows how to make eyes track the mouse position, but if you look closely as that program runs you will see a noticeable flicker.
The solution is quite simple: set the form’s DoubleBuffered property to true. Rather than drawing everything on the screen as it is generated, this property makes the form first draw onto an image in memory and then display the result only when the image is complete. The result is flicker-free.
For another example that uses double buffering, see Use double buffering to prevent flicker in a PictureBox in C#.




Oh, how I wish we should learn C# in school and not C++..