SetForeColor method
Available for all objects except Image, HScroll, VScroll, ToolBar, StatusBar ProgressBar, Slider, TabStrip, UpDown, Animate, IpAddress, ImageCombo, Calendar, DateTime and HotKey.
Prototype
SetForeColor Proto hWnd:HWND, crForeColor:COLORREF
Syntax
Invoke SetForeColor, hWnd, crForeColor
Function
Sets the ForeColor property for an object.
Parameters
hWnd
Handle to the object.
crForeColor
A COLORREF value specifying the new fore color for the object.
Return value
Eax/Rax returns TRUE if successful, or FALSE if not.
REMARKS: The most significant byte of crForeColor
specifies whether the color is an RGB value (00H) or a system color (80H), while the other three
bytes are the corresponding RGB values. For example, a value 00FF0000H means blue, 0000FF00H
means green and 000000FFH means red, while 80000005H means the system color number 5 (COLOR_WINDOW).