Imports System.Runtime.InteropServices
<DllImport("user32.dll")> _ Private Shared Function GetSysColor(ByVal nIndex As Int32) As Int32 End Function <DllImport("user32.dll")> _ Private Shared Function SetSysColors(ByVal cElements As Integer, ByVal lpaElements() As Int32, ByVal lpaRgbValues() As Int32) As [Boolean] End Function Private Const COLOR_ACTIVECAPTION As Integer = 2 Private oldColor As Integer Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated oldColor = GetSysColor(COLOR_ACTIVECAPTION) Dim element() As Integer = {COLOR_ACTIVECAPTION} Dim rgb() As Integer = {Color.White.ToArgb() And &HFFFFFF} Dim b As Boolean = SetSysColors(1, element, rgb) End Sub 'Form1_Activated Private Sub Form1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Deactivate Dim element() As Integer = {COLOR_ACTIVECAPTION} Dim rgb() As Integer = {oldColor} Dim b As Boolean = SetSysColors(1, element, rgb) End Sub 'Form1_Deactivate>How do I change the color of the Title Bar in Windows Forms (VB.Net)? I need to set it to green and have been unable to find a reference so far.