mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
14 lines
544 B
C#
14 lines
544 B
C#
namespace UVtools.GUI.Extensions
|
|
{
|
|
public static class ControlExtensions
|
|
{
|
|
public static void SetDoubleBuffered(this System.Windows.Forms.Control c)
|
|
{
|
|
if (System.Windows.Forms.SystemInformation.TerminalServerSession)
|
|
return;
|
|
System.Reflection.PropertyInfo aProp = typeof(System.Windows.Forms.Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
|
aProp.SetValue(c, true, null);
|
|
}
|
|
}
|
|
}
|