Summary:
Determines if TitleBar Gradient effect is enabled.
Please note: This code requires Win 98/ME/2k/XP. You would probably want to check for Windows version before executing this code.
VB Code:
'declare api functions
Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, _
ByVal uParam As Long, _
ByVal lpvParam As Any, _
ByVal fuWinIni As Long) As Long
'declare constants
Public Const SPI_GETGRADIENTCAPTIONS = &H1008
Usage Example:
VB Code:
Dim bGradientEnabled as Boolean
bGradientEnabled = CBool(SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0&, "", 0&))
Return Values:
Will return True if TitleBar Gradient is enabled, False otherwise.
Notes:
The declarations for API functions, constants, types and the GetRGBColors function can be moved to a module. If so, they should be declared as Public.
See Also:
Determine Windows Version