Instead I would use double buffering. Just use the line
this.SetStyle(ControlStyles.AllPaintingInWmPaint |ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
There is a nice article on double buffering Win Forms
here[
^].
I have been writing software professionally for many years, mostly using C, C++ and C#.