Custom colors for controls instead of inheriting color windows scheme?

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Just curious if anyone has solved this one. What I'd like to do is to have
form controls that lack explicit color settings use colors of my choosing
instead of inheriting the current windows color scheme. An example of this
is the access tab control, I can set the Back Style to transparent and most
of the controls area displays with the forms background color but the actual
tab buttons and tab button area still shows up as that old grey color. I
can't seem to find a setting anywhere to reset this. I did find the
information on how to set other controls color properties to use the current
windows scheme, but what I'm looking for is to go the other way and have
controls ignore the default scheme. I found this article on the MS site:
http://office.microsoft.com/en-us/assistance/HP052511011033.aspx?Product=acc2003
but it looks like it's specific to Access 2003 and WinXP and I'm currently
using Access 2002 on Win2K and WinXP. Anyone have any hints or tips on this
one?


Jon
 
Thanks for the reply, but that's the case that I've already figured out.
What I really want to do is have a control NOT use the windows scheme. For
instance scrollbars in Access will always use the windows scheme, in most
cases different shades of grey. How can I make them say for instance be
shaddes of blue on a particular form independant of what the windows scheme
is set to?

Jon
 
For ScrollBars, Menus and other intrinsic window controls you can't
without subclassing each control...period.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Ouch...that answer sounds hard so I bet it's correct! Any pointers on how to
get started on learning how to do that. I can work around it for the time
being but would eventually like to be able to change these things. I have an
unread book somewhere around here called "Subclassing and Hooking in VB"
(sounds like a Marxist manifesto on the relationship of protected capital
and prostitution doesn't it?), but if there are any web links or other
publications that are also good I'd love to hear about them. Thanks for the
advice everyone!

Jon
 
You will not find many examples of doing this in VB and particular with
Access VBA. Subclassing from within Access requires that you house the
subclassing code in an external DLL. Also many of the standard Access
controls are lightweight in nature(do not expose a window handle nor a
permanent Device context.).

Honestly, why would you want to override the user's preferences for
Windows color settings for intrinsic controls?

There are many example on my site of use the WIndows API to
modify/enhance Access forms and controls. Perhaps you should look at a
few of these examples before deciding on your present course of action.

Good luck.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Hummmm...I'll check your code out. Thanks for the advice.

It's not a big priority...I've just created a few forms with really good
color schemes. I have all of the controls and backgrounds set to look really
great but when a scrollbar or tab control is present....whap...I get a big
dose of that ugly grey.

As a side note, I wouldn't normally care much at all and do all of my forms
in standard windows grey but with the colorful WinXP, Apple OSX and all
kinds of applications being "skinable" these days I'm trying to spice up my
forms to keep up with the times. Having that uncontrollable windows grey
jump up in the middle of an otherwise beautiuous form is weak. Looks like MS
might have addressed this to some degree in Access 03 running under WinXP
but I haven't upgraded yet.


Jon
 
Back
Top