Solved

Text Box - Rogue Backcolour

Posted on 1999-01-21
7
147 Views
Last Modified: 2010-05-03
I have a text box which appears in two slighly different hues, one where the text is entered and a lighter one where the box is still empty.

My PC shows the difference clearly whilst on my colleagues the difference is negligible and would only be seen if you were told to look out for it.

I dont want this colour difference - can any body tell me how to get rid of it.

When the text box is completely empty a band of this slight shading appears across its top line, the rest of the text box being a shade lighter.
0
Comment
Question by:Taranadilla
7 Comments
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
I don't know if this explains your problem or not, but here goes:

Depending on your color mode, some colors are made up of "dithered" colors.  If you go into Windows Paintbrush, for example and fill a large area with some of the pastel type colors, then look at it with the magnifying glass, you will see a checkerboard pattern.  While a textbox could show a dithered pattern in it's background, the system cannot use a dithered background as the fill behind individual letters -- such as the white space in the middle of this "O".  What the system does is select the closest possible non-dithered color to replace it.  There is nothing you can do, but ensure that you select a non-dithered color for all of your backgrounds.

That said.  Even with non-dithered colors, there are variations between different systems.  I don't know if it is because of the video cards, or the monitors, but sometimes I'll have a background color that is part of a graphic that is supposed to blend into the background color of a form, that looks great on most systems, but will show up differently on others.  I haven't found anything I can do about that.

MD
0
 

Author Comment

by:Taranadilla
Comment Utility
I dont think this is the solution because the text box is actually shaded differently according to whether text has been entered.  If it was dithered it would still be the same throughout.  It isnt that it is different on my pc to anyone elses, but it is actually 2 shades within the same text box.


0
 
LVL 1

Expert Comment

by:rondeauj
Comment Utility
if you are using the RGB() function to set your colors try using the vbconst for system colors.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Expert Comment

by:bear454
Comment Utility
The behavior you describe is consistent with mdougan's comment & my own experience.  Set the background color to a basic vbconst color, such as vbWhite, or vbWindowBackgroud.

Jeez.
0
 
LVL 3

Accepted Solution

by:
HATCHET earned 100 total points
Comment Utility
Taranadilla,

First and formost, make sure that you Right Click on your desktop and select Properties to bring up the display properties.  Go to the Settings tab and make sure you're Color palette is set to AT LEAST 16 Bit color on both yours and the other computers.  This will give you true colors, and not colors that are CLOSE to what they should be.

Second, go and click on all the TextBox controls that are in question and then go to the BackColor property and click then Down Arrow.  Set BackColor to "Window Background" under the System tab, or go to the Palette tab and set it to White... or any other color you like.

Third, go to the ForeColor property and click the Down Arror.  Set the ForeColor to "Window Text" or click the Palette tab and set it to Black... or any other color you like.

That should fix your problem.  Lemme know.

HATCHET
0
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
I thought you were saying that the background of the textbox where there is no text is a different shade from the background where there is text.  If so, this is exactly the type of behavior caused by having the textbox backcolor a dithered color.  

If, however, the textbox has different shades where there is no text, then you're right, it is not likely a dithering problem.
0
 

Author Comment

by:Taranadilla
Comment Utility
You're right, using a palette colour removes the problem - only we're using a specially chosen set of colours and setting the RGB to that colour.  It must be something about the particular colour we are using.

Thanks for your help anyhow

T


0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now