Detecting Dark Mode

I’ve looked through the forum for a similar question but found none. Is there a way to check the User’s system to see if they are in either Light or Dark mode?

In Xojo 2018R4, there’s IsDarkMode, which returns true when the OS is in dark mode and the app is running in Mojave or later and Supports Dark Mode is turned on in the project’s Shared Build Settings.

Otherwise, Michael Diehr posted a function on this forum sometime last August that checks for dark mode on Mac.

In Xojo 2018 R3 onwards, if the project has ‘supports Dark Mode’ ticked, then an environmental variable isDarkMode will return true.

Ok, thank you. I’ll try it.