ACC: How to Get Red, Green, or Blue Components from RGB ValueLast reviewed: August 29, 1997Article ID: Q112061 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article describes a sample user-defined Visual Basic for Applications function, GetRGB(), that returns the red, green, or blue component from an RGB color value. Note that this behavior is the opposite of the Visual Basic for Applications function RGB(). This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access versions 1.x and 2.0. For more information about Access Basic, please refer to the "Introduction to Programming" manual in Microsoft Access version 1.x or the "Building Applications" manual in Microsoft Access version 2.0.
MORE INFORMATIONRGB color values are mathematical combinations of red, green, and blue components. The intensities of these components can range from 0 to 255. For example, the RGB color value for white is 16777215, which has component intensities of 255 for red, green, and blue. The following example demonstrates how to use the GetRGB() function to return the RGB color components from the RGB color value in the Order form's detail section BackColor property:
REFERENCESFor more information about the RGB() function, search the Help Index for "RGB Function."
|
Additional query words: video screen
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |