Results 1 to 11 of 11

Thread: Windows Theme!

Hybrid View

  1. #1
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Windows Theme!

    VB Code:
    1. Private Declare Function OpenThemeData Lib "uxtheme" ( _
    2.     ByVal hWnd As Long _
    3.     ByVal pszClassList As Long _
    4. ) As Long
    5. Private Declare Function CloseThemeData Lib "uxtheme" (ByVal hTheme As Long) As Long
    6. Private Declare Function GetCurrentThemeName Lib "uxtheme" ( _
    7.     ByVal lpszThemeName As Long, _
    8.     ByVal dwMaxNameChars As Long, _
    9.     ByVal lpszColorBuff As Long, _
    10.     ByVal cchMaxColorChars As Long, _
    11.     ByVal lpszSizeBuff As Long, _
    12.     ByVal cchMaxSizeChars As Long _
    13. ) As Long
    14.  
    15. Public Function IsXPThemed() As Boolean
    16.     Dim hTheme As Long
    17.     hTheme = OpenThemeData(0, StrPtr("ExplorerBar"))
    18.     If (hTheme) Then
    19.         CloseThemeData hTheme
    20.         IsXPThemed = True
    21.     End If
    22. End Function
    23.  
    24. Public Function XPThemeName() As String
    25.     If (IsXPThemed()) Then
    26.         XPThemeName = Space$(260)
    27.         GetCurrentThemeName 0, 0, StrPtr(XPThemeName), 260, 0, 0
    28.         XPThemeName = Trim$(XPThemeName)
    29.     Else
    30.         XPThemeName = "n/a"
    31.     End If
    32. End Function
    Last edited by penagate; Dec 26th, 2005 at 06:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width