Prev Index Next

What Colour

Timer pixel test

Timer pixel test

Notes: This program shows the use of the timer to do status updates. When the timer goes off the program gets the colour information for the pixel currently under the mouse cursor and displays the hexadecimal RGB values. I modified this program a bit from the original example in the book by adding the R G and B characters to the displayed string so it's clear what each value means and by adding a rectangle to display the colour as a larger block.

Description: A screenshot of a program in front of a window containing code. The lower part of the program contains a rectangle with the currently set colour and the upper part shows the R G and B values of that colour.

Prev Index Next