You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
445 B
C#
15 lines
445 B
C#
using System.Reflection;
|
|
using System.Windows.Forms;
|
|
|
|
namespace DeepNestPort
|
|
{
|
|
public static class ControlExtensions
|
|
{
|
|
public static void DoubleBuffered(this Control control, bool enable)
|
|
{
|
|
var doubleBufferPropertyInfo = control.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
|
doubleBufferPropertyInfo.SetValue(control, enable, null);
|
|
}
|
|
}
|
|
}
|