hi
In C#.net windows based application..
I want to set common properties like color, font size, height, width, font type of all the label, button and textbox controls in C#.net forms .......
How can i do it ......
Please provide me code for that ......
i have tried that code , but it's not working ........
In C#.net windows based application..
I want to set common properties like color, font size, height, width, font type of all the label, button and textbox controls in C#.net forms .......
How can i do it ......
Please provide me code for that ......
i have tried that code , but it's not working ........
Code:
private void ResetAllControlsBackColor(Control control)
{
control.BackColor = SystemColors.Control;
control.ForeColor = SystemColors.ControlText;
if(control.HasChildren)
{
// Recursively call this method for each child control.
foreach(Control childControl in control.Controls)
{
ResetAllControlsBackColor(childControl);
}
}
}