[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Text Box - Rogue Backcolour

Posted on 1999-01-21
7
Medium Priority
?
162 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
ID: 1469850
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
ID: 1469851
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
ID: 1469852
if you are using the RGB() function to set your colors try using the vbconst for system colors.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:bear454
ID: 1469853
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 300 total points
ID: 1469854
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
ID: 1469855
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
ID: 1469856
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Suggested Courses

834 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