Как сменить системные цвета
Private Declare Function SetSysColors Lib "user32" _
(ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
Private Const COLOR_SCROLLBAR = 0
Private Const COLOR_BACKGROUND = 1
Private Const COLOR_ACTIVECAPTION1 = 2
Private Const COLOR_ACTIVECAPTION2 = 27
Private Const COLOR_INACTIVECAPTION = 3
Private Const COLOR_MENU = 4
Private Const COLOR_WINDOW = 5
Private Const COLOR_WINDOWFRAME = 6
Private Const COLOR_MENUTEXT = 7
Private Const COLOR_WINDOWTEXT = 8
Private Const COLOR_CAPTIONTEXT = 9
Private Const COLOR_ACTIVEBORDER = 10
Private Const COLOR_INACTIVEBORDER = 11
Private Const COLOR_APPWORKSPACE = 12
Private Const COLOR_HIGHLIGHT = 13
Private Const COLOR_HIGHLIGHTTEXT = 14
Private Const COLOR_BTNFACE = 15
Private Const COLOR_BTNSHADOW = 16
Private Const COLOR_GRAYTEXT = 17
Private Const COLOR_BTNTEXT = 18
Private Const COLOR_INACTIVECAPTIONTEXT = 19
Private Const COLOR_BTNHIGHLIGHT = 20
Private Const COLOR_BUTTONDARKSHADOW = 21
Private Const COLOR_BUTTONLIGHTSHADOW = 22
Private Const COLOR_TOOLTIPTEXT = 23
Private Const COLOR_TOOLTIP = 24
Private Sub Command1_Click()
' Устанавливаем градиентный заголовок для активной формы
' из черного и синего цвета
SetSysColors 1, COLOR_ACTIVECAPTION1, vbBlack
SetSysColors 1, COLOR_ACTIVECAPTION2, vbBlue
End Sub
|