Share via

How to program a dark mode

Dos 1 Reputation point
2020-10-26T07:31:28.727+00:00

Hello Everyone!

Recently I have been trying to make my program better, I want to add a dark mode but I cant find out how!
I went to google but I couldn't find anything on it. The closest thing I found was a dark mode using JavaScript.
Please Help!

Kind regards Dos

Developer technologies | Windows Forms
0 comments No comments

1 answer

Sort by: Most helpful
  1. Castorix31 91,876 Reputation points
    2020-10-26T07:40:14.217+00:00

    You detect the mode change with WM_SETTINGCHANGE and lParam = "ImmersiveColorSet"

    then you get and change colors from Windows.UI.ViewManagement.UIColorType

    or Immersive color APIs like GetImmersiveColorFromColorSetEx
    (I had posted a sample in C++ to get all colors at How to get colors of default app mode "Dark" in my Win32 App )

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.