I have a mainform and i want to change the colour through the class file which is an separate file.but when i try to implent that i am facing errors please help me with this.
public void Themecolor()
{
this.BackColor = Color.Black;
this.ForeColor = Color.White;
}
One way of handling the Theme is as follow.
Step 1: You can have a separate
classfile containing the Themes Colors you need to change.Step 2: On
FormInitialize or Load you can get allControlsin theFormas set its colors accordingly from the Theme classThe Output: