This is how you can apply backcolor to all forms within your project.
using System.Reflection;
private void btnChangeFormColor(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
Color backcolor = colorDialog1.Color;
Type[] AllTypesInProjects = Assembly.GetExecutingAssembly().GetTypes();
for(int i=0;i<AllTypesInProjects.Length;i++)
{
if (AllTypesInProjects[i].BaseType == typeof(Form))
{
Form f = (Form)Activator.CreateInstance(AllTypesInProjects[i]);
f.BackColor = backcolor;
}
}
}
Source for getting all forms within project:
http://codeindex.blogspot.in/2011/11/get-list-of-all-forms-in-project-using.html[
^]