[API]
IsThemeActive
IsAppThemed
OpenThemeData
CloseThemeData
Public DrawFrameControl
Public IsThemeBackgroundPartiallyTransparent
Public DrawThemeParentBackground
Public DrawThemeBackground

[INCLUDE]
CreateWindowEx

[CODE]
Private Sub UnTheme()
  #If XPTheme_Scrollbar Then
    If Not hThemeDataScrollbar = 0& Then Call CloseThemeData(hThemeDataScrollbar): hThemeDataScrollbar = 0&
    #End If
  #If XPTheme_FrameButtons Then
    If Not hThemeDataFrameButtons = 0& Then Call CloseThemeData(hThemeDataFrameButtons): hThemeDataFrameButtons = 0&
    #End If
  End Sub

Private Sub UpdateTheme()
  Dim xLong1 As Long

  Call UnTheme
  On Error GoTo Er1
  If Not IsThemeActive = 0& Then
    On Error GoTo 0
    If Not IsAppThemed = 0& Then
      xLong1 = CreateWindowEx(0, "STATIC", vbNullString, &H8000003, 0&, 0&, 32&, 32&, 0&, 0&, 0&)
      If Not xLong1 = 0& Then
#If XPTheme_Scrollbar Then
        hThemeDataScrollbar = OpenThemeData(xLong1, StrPtr("SCROLLBAR"))
#End If
#If XPTheme_FrameButtons Then
        hThemeDataFrameButtons = OpenThemeData(xLong1, StrPtr("WINDOW"))
#End If
        Call DestroyWindow(xLong1)
        End If
      End If
Rs1:
    On Error GoTo 0
    End If
  
  Exit Sub

Er1:
  Resume Rs1
  End Sub
