Solved

Dealing with User's Screen Color

Posted on 2000-02-16
4
154 Views
Last Modified: 2010-05-02
I wrote a program using VB6 while my PC was running Win98 and was set to 800x600 True Type (32bit). The graphic colors looked great on my PC but when I tested it on another PC that was set to 256 Color it looked bad.
How do I accommodate the different color settings between PCs so that my program will look good no matter what the user's PC color setting is? Someone suggested WinAPI functions, CreatePalette, SelectPalette, and RealizePalette.  I either need sample code or a good on-line source that explain exactly what this does and how to code it.  If you don’t feel that is the way to handle the problem, what is?
Thanks for the help.
0
Comment
Question by:dlwulfe
  • 2
4 Comments
 
LVL 15

Expert Comment

by:ameba
Comment Utility
Use 2 (or more) sets of bitmaps/icons. Or use only 256 colors bitmaps/icons.
0
 
LVL 3

Accepted Solution

by:
MTroutwine earned 200 total points
Comment Utility
Here is some good sample code for handling screen colors and resolutions.  Keep in mind that if a graphic was created to be displayed in 32bit mode it will appear grainy in 256.  You may have to create seperate graphics which appear 'normal' for each color setting.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=3972

:>)
0
 

Author Comment

by:dlwulfe
Comment Utility
Thanks for the code sample and for the great site you referenced.

This is for ameba and/or MTroutwine:
Just for clarity for future program I write...Did I create my own problem by creating the graphics in True Color (32bit)instead of in a lower color resolution? In the future can I create ONE set of graphics at a lower color resolution so they will look OK at higher color resolutions? I so, would I then need to create them in 16 bit or would 256 be OK?

Thanks so much, I would give up on programming if I didn't have this site and the experts who share information!
0
 
LVL 15

Expert Comment

by:ameba
Comment Utility
I use only 256 set(s). Winzip uses 2 color sets. MS uses sometimes 4 color sets.

Be sure to test your app on 256 colors and on both Small/Large Fonts setting.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

15 Experts available now in Live!

Get 1:1 Help Now