Solved

Dealing with User's Screen Color

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

776 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