C#.net windows based application..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • safal86
    New Member
    • Sep 2013
    • 1

    C#.net windows based application..

    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 ........

    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);
          }
       }
    }
    Last edited by Rabbit; Sep 6 '13, 07:50 PM. Reason: Please use code tags when posting code or formatted data.
Working...