When developing a WinForm program using C #, it is often found that TabControl has a serious flickering problem. This is mainly because the TabControl control will draw the default window background during implementation. In fact, the following simple code can effectively alleviate this problem. This is the role of skills. You do not need to understand too much knowledge, but you need to accumulate a lot to get twice the result with half the effort. 1 using System; 2 using System. collections. generic; 3 using System. text; 4 using System. windows. forms; 5 namespace WfGUI. forms 6 {7 /// <summary> 8 // TabContriol 9 that does not flash /// </summary> 10 public class NoFlashTabControl: tabControl11 {12 // <summary> 13 // constructor, set the control style 14 /// </summary> 15 public NewTabControl () 16 {17 SetStyle18 (ControlStyles. allPaintingInWmPaint // draw all messages in the window. 19 | ControlStyles. optimizedDoubleBuffer // use double buffer 20, true ); 21} 22 // <summary> 23 // set the extended style of parameters created in the control window 24 /// </summary> 25 protected override CreateParams CreateParams26 {27 get28 {29 CreateParams cp = base. createParams; 30 cp. exStyle | = 0x02000000; 31 return cp; 32} 33} 34} 35}