For example, try adding this line inside the second loop:
if( i == now.Day ) ucdays.BackColor = Color.Red;
You can also add a bool or DateTime parameter to the days function, and adjust all of appearance inside the function.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Good day, I created a calendar but I don't know how to change the back color of User Control which equal to day today.
For example, try adding this line inside the second loop:
if( i == now.Day ) ucdays.BackColor = Color.Red;
You can also add a bool or DateTime parameter to the days function, and adjust all of appearance inside the function.