In order to use XP themes you need to be running Windows XP at a minimum. This code will detect the filename being used and the theme color. This is a Global detection and not just for a single application or any trickery.
VB Code:
  1. Option Explicit
  2.  
  3. Private Declare Function GetCurrentThemeName Lib "uxtheme.dll" (ByVal pszThemeFileName As String, ByVal dwMaxNameChars As Integer, _
  4. ByVal pszColorBuff As String, ByVal cchMaxColorChars As Integer, ByVal pszSizeBuff As String, ByVal cchMaxSizeChars As Integer) As Long
  5.    
  6. Private Sub Command1_Click()
  7.     Dim lResult As Long
  8.     Dim strFileName As String
  9.     Dim strColor As String
  10.     Const S_OK As Long = &H0
  11.    
  12.     strFileName = Space(255)
  13.     strColor = Space(255)
  14.     lResult = GetCurrentThemeName(strFileName, 255, strColor, 255, vbNullString, 0)
  15.     If lResult <> S_OK Then
  16.         MsgBox "Error: Can not read theme (if any).", vbOKOnly + vbInformation
  17.         Exit Sub
  18.     End If
  19.     strFileName = InStrRev(strFileName, vbNullChar)
  20.     strFileName = Replace(strFileName, vbNullChar, "")
  21.     strColor = Replace(strColor, vbNullChar, "")
  22.     If Trim$(strFileName) = vbNullString Then strFileName = "Windows Classic (No Theme)"
  23.     If Trim$(strColor) = vbNullString Then strColor = "None"
  24.     MsgBox "Theme: " & strFileName & vbNewLine & "Color: " & strColor
  25. End Sub