Created
December 12, 2017 02:36
-
-
Save drewchapin/2135072d59a2125d9bc4ee843a7c94ad to your computer and use it in GitHub Desktop.
Turns on or off double buffering for controls that do not expose the property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Turns on or off double buffering for controls that do not expose the property. | |
/// </summary> | |
public static void DoubleBuffered( this Control control, bool value ) | |
{ | |
Type type = control.GetType(); | |
PropertyInfo info = type.GetProperty("DoubleBuffered",BindingFlags.Instance|BindingFlags.NonPublic); | |
info.SetValue(control,value,null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment