Changing the background colour of multiform application


Well-known member
Jun 7, 2004
Wales, UK
Programming Experience

I have an application with many forms. What I need to do is have some kind of global variable that each form can access to tell it what colour to set its background to. This is because if I decide to change the colour of the background it will be very tedious to change 15 forms. Does anyone have a way of doing this? I was thinking about a class that contains this information and each form could access it at Form_load but I don't know how to do it.

Thanks for any help
One way I would do it by adding a module to the application and put in a public variable or a property to hold the color that all forms can access. Then in the form load event of each form set the back color property to the public variable or property. This way you have one place to change the color which in turn will change the color on all forms.
Hope this helps.

Latest posts