Multi colored form

J

johnb

Is it possible to have say 3 background colors on a single form? If yes how
is it done or worked around?

TIA
john
 
M

Maurice

You mean in one section? Not that I know of. A workaround could be to create
an image with the three colors you want and use that as a background image.
p.s. with the one section I meant only the detailsection. Header-detail and
footer can be coloured separately.

hth
 
J

johnb

Hi Maurice
Thank you for the reply. I want to change backcolor in the details section.
I was thinking of using a control that allowed textboxs to sit on top of it
and an event could change the color. I shall try the image control/

Regards
john
 
M

Maurice

Hi John,

Just remember you are trying to create a database instead of nice
'fireworks' here. What I mean is focus on the data and find simple ways to
communicate with the users. Changing backgrounds is an option but there are
simpler ways to go about it.
 
M

M Skabialka

You could create boxes which are behind the controls, then change the color
in code based on a particular event occurring. I prefer to change the
background color of a control if it needs attention, using conditional
formatting, or code, but often highlight parts of the form with different
background color boxes which are static.

Mich
 
S

Stephen Lebans

See:
http://www.lebans.com/gradientfill.htm
A97GradientFill.zip is a database containing a function that demonstrates
how to enable Gradient Backgrounds for your Forms with a single function
call.

Version .8

Fixed two bugs brought to my attention by David Fenton. The one pixel black
border has been removed. Gradient fills now more logically starting from
left to right and top to bottom.

Version .7

Fixed runtime bug. Here is the modified Form Resize event code:

Private Sub Form_Resize()
' Call our function to redraw the Form's background Picture
' Access will generate a runtime error complaining
' that our image is not in the required DIB format
' even though it is if we:
'1) Minimize the form
'2) Shrink the form vertically below about 500 Twips
If Me.WindowHeight < 500 Then Exit Sub
GradientBackground Me, m_RGBStart, m_RGBEnd, m_Direction
End Sub

Version .6

First release
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
O

OTWarrior via AccessMonster.com

Stephen said:
See:
http://www.lebans.com/gradientfill.htm
A97GradientFill.zip is a database containing a function that demonstrates
how to enable Gradient Backgrounds for your Forms with a single function call.

any way of using this on a label? I have figured out how to implent it into
my database :)

Private Sub Form_Resize()
If Me.WindowHeight < 500 Then Exit Sub
GradientBackground Me, m_RGBStart, m_RGBEnd, m_Direction
End Sub

i guessed it would be this, but that did not work

GradientBackground Me.image54, m_RGBStart, m_RGBEnd, m_Direction

can you only do this on backgrounds?
 
Top