Change the Color of the Title Bar
Posted on 2001-08-05
Need to use the rest of my points before I go on vacation.
How can I change the color of the Title Bar on the MDI Form and all Child forms in an application? I have a function, but the right area of the title bar remains light blue. I'd like it to be one solid color.
Here is what I have (from freevbcode.com):
Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, _
lpColorValues As Long) As Long
Global Const COLOR_ACTIVECAPTION = 2
Public Function ChangeTitleBarColor(NewColor As Long) As Boolean
Dim lRet As Long
lRet = SetSysColors(1, COLOR_ACTIVECAPTION, NewColor)
ChangeTitleBarColor = lRet > 0
Public Function GetTitleBarColor() As Long
GetTitleBarColor = GetSysColor(COLOR_ACTIVECAPTION)