Related BackColor/ForeColor Question

  • Thread starter Thread starter Joe Williams
  • Start date Start date
J

Joe Williams

Is there a way to declare the color of all the controls on a form without
explicitly declaring each control name in code?

I am trying to set up a color pallette that the user can define for
themselves and thus would change the foreground and background colors of
every form and control when they are opened, based on that users selections

Thanks

Joe
 
On Error Resume Next ' Used to override errors on controls that don't
support the property you are referencing.
Dim ctrl as Control 'Create a control to reference
For Each ctrl in Me.Controls' Loop through the controls on the form
ctrl.Property = TheValue' Set a Property value for the control
Next

Note....
Using custom colors on a form will greatly decrease the speed of your
database on some machines and definitely if you are using a remote desktop
or Terminal services. It is best to use the standard theme provided by
Microsoft.

They put a lot of research into the color schemes they use, and support them
throughout their applications and operating systems..

B Comrie
http://www.codewidgets.com
 
Back
Top