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

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

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