Changing the background colour of multiform application

levyuk

Well-known member
Joined
Jun 7, 2004
Messages
313
Location
Wales, UK
Programming Experience
3-5
Hello,

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
 

Bilalq

Member
Joined
Jul 21, 2004
Messages
24
Programming Experience
3-5
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.
 
Top Bottom