Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dealing with User's Screen Color

Posted on 2000-02-16
4
Medium Priority
?
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

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

Accepted Solution

by:
MTroutwine earned 800 total points
ID: 2527328
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
ID: 2527529
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
ID: 2527610
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

610 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