Color Count OCX  1999  by Centropolus Software
weswhite@wtd.net

July 4, 1999

Centropolus Software Solutions:

ColorCountOCX -- Returns the number of colors of a video display.
ColorCountOCX Ver 2 -- Version 2 has the additional ability to retrieve the screen size in pixels. This version is not freeware.
CalendarPrintOCX -- Prints a calendar for any month to a printer.
VQMessageBox Designer -- Aid for designing message box, input box and comments in VB code.
Closewindows VB Add-in -- closes all windows in VB IDE.
VQ Code Library -- A repository and VB Add-In for storing VB code.
Change Journal -- Tracks code change requests and bugs.


Color Count OCX Version 1.0

Overview

Color Count OCX is an ActiveX control that will retrieve the number of colors available on a PC video monitor. When you set the number of colors in the color palette in Windows Display Properties (on the settings tab) you are limiting the display to a certain number of colors. In cases where a VB programmer designs a bitmap in True Color using 32 bit color mode, the True Color image will be limited on a system where only 256 colors are available. In other words the bitmap image may appear distorted. This control detects the number of colors available to a system. Thus the programmer can construct bitmaps for each display setting, or display a message that the user should enable a certain color mode to take advantage of the pictures your program displays. For example, if you have a picture saved with 256 colors and the same picture using 32 bit True Color, then you could in the form load use the control to detect the number of colors on a system. If the control returns 8 then the user is limiting the display to 256 colors. You would then display the bitmap with 256 colors. If the control returned 16 then the user is in High color mode and you would display the 256 color picture. If the control returned True Color then you could display your True Color picture safely.

Version 1.0 of the control does not supply a help file. Simce the control has only two methods, the text below will serve as the help.

The OCX has only two methods: 
NumColors_Long 
NumColors_Str

Call Methods:

Place a Color Count OCX control on a form and create two command buttons. Call one button "Get a Color String Statement" and the other "Get Number of Colors (Long)".


Private Sub Command1_Click(Index As Integer)

Dim ColorStr As String
Dim nColors As Long

Select Case Index
  Case 0
    'Get color string statement
    ColorsStr = ColorCount1.NumColors_Str
    MsgBox ColorsStr
    
    'might see a string like 'True Color 32 Bit' or '256 Colors'

  Case 1
    'Get number of colors
    nColors = ColorCount1.NumColors_Long
    MsgBox Str(nColors)

    'Displays 4 for 16 colors, 8 for 256 colors, 16 for High Color, 32 for True Color.

    Select case nColors
	Case 4
	  sTemp = "You are displaying only 16 colors. " & -
                  "Come on get with it and upgrade your " & _
		  "system to at least 256. " & _
                  "This program will display Zero Bitmaps."
	case 8
	  sTemp = "You are displaying 256 colors. " & _
                  "Your display is barely breathing, but I " & _
		  "will be nice and display only my " & _
                  "best 256 color bitmaps."
	case 16
	  sTemp = "You are in High Color Mode, but " & _
                  "unfortunately this program has only 256 " & _
		  "color and True color splash screens. " & _
                  "So you get the 256 color picture. If you " & _
		  "switch to the Trye Color mode, " & _
                  "the bitmps are pretty good."
	case 32
	  sTemp = "Congradulations, you are in True Color mode. " & _
                  "You are a true power user. I will " & _
	          "display my best color bitmaps for you.
         
    End select

    MsgBox sTemp

End Select

End Sub

Notes: Now any of you who are new programmers -- bare with me. I am old, and sometimes cynical. But please do not display such messages to the users of your programs. Something like "You are displaying only 16 colors. This program was designed to display 256 and True Color pictures. We recommend that you switch to a color mode that can take advantage of the color settings for this program."

Run the program and test both buttons. If the results surprises you, select the Settings Tab on the Display Properties screen and note the Color Palette setting. Now change the color pallete on the computer and notice the difference.


OCX Evaluation

The evaluation copy is distributed in a self-extracting installation file (ClrCnt##.exe). Keep this file in case you need to re-install the program. The ## indicates the version of the OCX.

Copy this file into a directory and run the EXE to install the software. The installation provides the OCX, this read me file, and a sample Visual Basic 5.0 program.

The OCX installation may be uninstalled from your computer. Double click on the file called UNWISE.EXE to erase all installation components from your computer. The uninstall file exists in the application directory to which you installed the program.


System Requirements

Color Count Ocx runs on 32-bit Windows platforms (95/98/NT), within ActiveX containers.

Color Count Ocx is free. The evaluation copy will display the about screen on initialization. That is when you load the OCX either in design or compiled code you will see the about box. The registered version does not display the about screen in this manner. 

Though this is a free OCX control, we would like to receive a registration either by mail or via E-mail. We will return the fully functional OCX control via E-Mail.

These registrations can only be sent via internet mail. The registered OCX can not be sent by mail on a floppy disk.

Send registrations to:

Wes White c/o Centropolus Software
800 Lakeside Cir # 626
Lewisville, Tx 75057

weswhite@wtd.net



------------------

License / Warranty

Color Count OCX  1999  by Centopolus Software

All rights reserved.

License Agreement:
You should carefully read the terms of the following license agreement before using Color Count OCX.

Evaluation Version:
You may freely copy and distribute the evaluation version of Color Count OCX. You may not modify the original OCX Code. Centopolus Software will not charge you for distribution of the program. You are prohibited from charging or requesting donations for any such copies, and from distributing the product with other software products without written permission from Centopolus Software.

Evaluation and Registration:
The evaluation version of Color Count OCX free.  

Disclaimer of Warranty:

THIS SOFTWARE AND ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.  Because of the various hardware and software environments that people may attempt to run Color Count OCX on, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.

Good practice dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire risk of using the program.  ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.

Under no circumstances will Centopolus Software or any of its agents be liable for loss of data or revenues do to data loss. Centopolus Software liability is limited to the purchase price. Upon written request, Centopolus Software will refund the purchase price of the software if received within 30 days from the date of purchase. Persons requesting a refund must state in writing why they are asking for a refund and list the problems they experience with the software. Persons who obtain a refund are required to destroy any backup copies they made of the program, and remove all software from their computers.

Windows (R) is a registered trademark of Microsoft Corporation.


