Solved

Dealing with User's Screen Color

Posted on 2000-02-16
4
157 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 200 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

696 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