Code: Select all
If OpenLibrary(0, "UxTheme.dll")
*f = IsFunction(0, "IsThemeActive")
If *f
Debug "Themes: " + Str(CallFunctionFast(*f))
EndIf
CloseLibrary(0)
EndIf -Anthony

Code: Select all
If OpenLibrary(0, "UxTheme.dll")
*f = IsFunction(0, "IsThemeActive")
If *f
Debug "Themes: " + Str(CallFunctionFast(*f))
EndIf
CloseLibrary(0)
EndIf 
Code: Select all
#STAP_ALLOW_NONCLIENT = 1 ;(1 << 0)
#STAP_ALLOW_CONTROLS = 2 ;(1 << 1)
#STAP_ALLOW_WEBCONTENT = 4 ;(1 << 2)
#WM_THEMECHANGED = $31A
; --> Disable window and gadget themes (skin)
Procedure.s DisableThemes()
If OpenLibrary(0, "UxTheme.dll")
*getTheme = IsFunction(0, "GetThemeAppProperties")
*setTheme = IsFunction(0, "SetThemeAppProperties")
theme = CallFunctionFast(*getTheme)
CallFunctionFast(*setTheme, theme &~#STAP_ALLOW_NONCLIENT &~#STAP_ALLOW_CONTROLS)
theme = CallFunctionFast(*getTheme)
Select theme
Case 0
theme$ = "Non-client area and Gadgets are not able to be themed"
Case 1
theme$ = "Non-client is able to be themed"
Case 2
theme$ = "Gadgets are able to be themed"
Case 3
theme$ = "Non-client area and Gadgets are able to be themed"
EndSelect
SendMessage_(WindowID(), #WM_THEMECHANGED, 0, 0)
CloseLibrary(0)
Else
MessageRequester("Error", "UxTheme.dll not found")
theme$ = ""
EndIf
ProcedureReturn theme$
EndProcedure
If OpenWindow(0, 10, 10, 300, 200, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "Disable Themes in XP") And CreateGadgetList(WindowID())
theme$ = DisableThemes()
If theme$
ButtonGadget(0, 100, 90, 100, 20, "Theme info")
EndIf
Repeat
event = WaitWindowEvent()
If event = #PB_EventGadget And EventGadgetID() = 0
MessageRequester("Theme info", theme$)
EndIf
Until event = #PB_Event_CloseWindow
EndIf
End
