Here is some code:
Option Explicit
Private Const COLOR_ACTIVECAPTION = 2
Private Declare Function GetSysColor Lib _
"user32" (ByVal nIndex As Long) As Long
Private Declare Function SetSysColors Lib "user32" _
(ByVal nChanges As Long, lpSysColor As Long, _
lpColorValues As Long) As Long
Public Function GetTitleBarColor() As Long
GetTitleBarColor = GetSysColor(COLOR_ACTIVECAPTION)
End Function
Public Function ChangeTitleBarColor(NewColor As Long) As Boolean
Dim lRet As Long
lRet = SetSysColors(1, COLOR_ACTIVECAPTION, NewColor)
ChangeTitleBarColor = lRet > 0
End Function
Hope that helps