Avoid flickering in dynamically rendered control in Windows App
Posted on by
Here is a tip shared by Kannan, a colleague of mine on how to avoid flickering when rendering controls dynamically in a Windows Application.
Enable double buffering, so that the flickering does not happen.
Add the following after the ‘InitializeComponent’ method.
1 2 3 | SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); |
That’s it.
Possibly Related posts:
- Configuring ThunderBird 2.0 for Gmail App Account After fiddling around for half an hour, here is how...
- Ascendas, Chennai Ascendas, Chennai – An IT park in Chennai city. I...
- C#: Calculate Age in Years, Month and Days Today I was given the task of finding the age...
Tags: C#, Programming
Good tip. Flickering is quite a bothersome issue indeed in windows application programming.