Jump to content
Sign in to follow this  

Disable themes/visual styles in your script

Recommended Posts


Just for your information: :whistle:

If you want to use some specific GUI-color-commands and have Visual Styles/Themes (not XP-Classic-Theme) enabled they sometimes will not work.

One possibility is to turn off the using of visual styles with a small "DllCall"-command in your script.

The best is if you place it at the beginning of your script before showing a GUI.

More infos also are here available:


; Functionality :
; just info about possibility to turn of theme-using in scripts/compiled-exe with using GUI stuff

$nFlag = 0  ; Visual styles are completely disabled in the running script
; $nFlag = 1; Nonclient areas of the GUI can use visual styles
; $nFlag = 2; Controls can use visual styles (like Buttons, Progressbar, Group-ctrl's, etc.)
; $nFlag = 4; Web content displayed ??? (info from MSDN) can use visual styles
; These flags can be combined with BitOr(...)

DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $nFlag)

Regards :dance:


Edited by Holger
  • Like 1

Share this post

Link to post
Share on other sites

Nice !! I switched to classic theme, but I think this will be very useful to anyone who has a progress bar in their GUI :whistle:

Thanks :dance:


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.