ACAT.Lib.Core.Utility.Windows.SetBackgroundColor C# (CSharp) Метод

SetBackgroundColor() публичный статический Метод

Sets the background color of the widget. Takes care of cross-thread invokations that would result in .NET exceptions
public static SetBackgroundColor ( Control control, Color color ) : void
control System.Windows.Forms.Control
color Color Color to set
Результат void
        public static void SetBackgroundColor(Control control, Color color)
        {
            try
            {
                if (control.InvokeRequired)
                {
                    control.Invoke(new setBackgroundColor(SetBackgroundColor), control, color);
                }
                else
                {
                    control.BackColor = color;
                }
            }
            catch { }
        }