Please see also my comments to the question.
I tried the same in a native c++ W32 Applicattion (c++ Builder). As I expected, in this case it is that fast, that you can't recognize the "color-fading".
So I had a look to the reference source of c# Winform TextBox
Reference Source[
^] and also to
Control.SetStyle(ControlStyles, Boolean) Method (System.Windows.Forms) | Microsoft Docs[
^].
I would speculate that you can speed up if you derive from TextBox and use SetStyle to change the drawing behaviour.
Final word
From my point of view, all in all not really worth to do it, but very interesting to dive into the deep of .net ;)
[Edit]
I tried with a UserControl derived from TextBox and was not able to speed up the fading. Here the ultimative hack.
WARNING I would never do this in production code.
using (SolidBrush shadowBrush = new SolidBrush(Color.Red))
{
for (int i = 0; i < 255; i++)
{
foreach (var myControl in myDailyToDoControlList)
{
if (myControl.Text == "")
{
shadowBrush.Color = System.Drawing.Color.FromArgb(255, 255 - i, 255 - i);
Rectangle r = myControl.ClientRectangle;
Graphics g = myControl.CreateGraphics();
g.FillRectangle(shadowBrush, r.X, r.Y, r.Width, r.Height);
}
}
}
for (int i = 0; i < 255; i++)
{
foreach (var myControl in myDailyToDoControlList)
{
if (myControl.Text == "")
{
shadowBrush.Color = System.Drawing.Color.FromArgb(255, 0 + i, 0 + i);
Rectangle r = myControl.ClientRectangle;
Graphics g = myControl.CreateGraphics();
g.FillRectangle(shadowBrush, r.X, r.Y, r.Width, r.Height);
}
}
}
}