Jump to content

Supporting dark mode for apps in windows

Recommended Posts

Hi guys,


I was looking into supporting dark mode for apps in windows 10 and detecting it was fairly easy. There might be other/better ways but this was my approach:

Func _AppsUseLightMode()
    Local $LightMode

    $LightMode = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme")
    If @error Then $LightMode = 1
    ; If @error is set it probably isn't a win version that supports dark mode

    If $LightMode = True Then
        ConsoleWrite("+> Light Mode" & @CRLF)
        Return True
        ConsoleWrite("!> Dark Mode" & @CRLF)
        Return False

Now when my detection function was fixed I tried to add dark colors to my GUI objects but for some reason I couldn't find a way to fix the light borders around the objects.

Has anyone found a fix for this? You can easily add a label with the correct background color as "border color" behind the input field on top (found this somewhere on the forum as well) but this wouldn't be a fix for let's say a listview etc. 

Any suggestions are welcome.



Link to comment
Share on other sites

  • 1 year later...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...