background color

fathi

New member
Local time
Tomorrow, 01:53
Joined
Dec 12, 2006
Messages
6
hi every one

i have an application and the user was asking me to give him the ability to change the backcolor of the main form
i had done that with one color option.

but now he wants to mix two colors together
any one can help me with that , if code or sample would be posted, that would be appreciated .

thanks in advance
 
Hi Fathi,

I am assuming you are talking about splitting the form background into two sections, each of different colour?

The easy way to achieve this would be with two textboxes - each sitting behind the controls of the form.

You can set the textbox background colour's accordingly.

eg. Me.textbox1.BackColor = RGB(RED,GREEN,BLUE)

Where RED, GREEN and BLUE are values associated with the colour you want to achieve (numbers between 0 and 255).

Cheers,

Rob
 
hey systemx, thats a useful tip.

there must be a whole load of little-known (to me anyway!) functions that can come in really useful. now is there a useable colourpicker tool ......
 
Form BackGround Color

hi every one

i have an application and the user was asking me to give him the ability to change the backcolor of the main form
i had done that with one color option.

but now he wants to mix two colors together
What I mean Is that the same as if you go to MS Word - Drawing Tool Bar -draw a box - then go to FILL COLOR at the tool bar - Fill Effects - Choose Two Colors . You would know what I main .

the User Wants to Do That At The start Up Man Form.

any one can help me with that , if code or sample would be posted, that would be appreciated .

thanks in advance
 
I think your referring to a gradient fill. As far as I know, this can't be done using Access' standard features.

Create an image in your paint program - set this as the form background and voila!

I do try to avoid using images in access though where possible - as have found it impacts largely on filesize.

I I have the wrong end of the stick with this one in terms of what you are asking...let me know. :)

Regards,

Rob
 
fathi said:
hi every one

i have an application and the user was asking me to give him the ability to change the backcolor of the main form
i had done that with one color option.

but now he wants to mix two colors together
any one can help me with that , if code or sample would be posted, that would be appreciated .

thanks in advance

I beleive you wish to build a gradient. Attached is the Gradients.zip which will unzip to Gradient.exe. This utility is done some 10 years ago using Delphi.

Just play around with the utility to get familiar with it. Once you have the colors you want, then just save the bitmap to disk and use this to insert in your form.

Best regards

Maurice St-Cyr

stcyrm@aol.com
 

Attachments

You could use the line control, in a control array. Not the most elegent, but basically you size the line to fit the width (1 px high) of the screen and set to the start colour, add another below it and change the colour to an intermediate and so on till you cover the form. It would take a bit of playing to work out how many lines and the increment for each in colour, but I have seen it used in the past. Personally I'd point your customer to a good book on HCI and explain why it's a bad idea in the first place.
 

Users who are viewing this thread

Back
Top Bottom