How to make a button that changes the background of all the forms at once in...

Aakarsh

New member
...vb 2005 Express Edition??????? Hi guys,
I am a starter at vb 2005 but know a lot
i want to make a button that changes the background color of all the forms together but i don't want to enter the names of forms simultaneously
what can be the code for it?
Any help would be appreciated a lot
Thanks
 
This can be harder then you think, the problem is that when the form is drawn on the screen, when you update the background you will need to redraw the form, One thing you can try, is having you Main form make insances of all the other forms, (you dont have to show them at first, just have the intance created) and in each form have a public funtion that will let you change the background by passing it a value, (ie blue) then when you change the background in the main form, it will call the method in all the instances that will let it change the background.

It's kinda complicated, i hope it helps.
 
Back
Top