Dark Mode for apps in Win 10?

Just starting out? Need help? Post your questions and find answers here.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Dark Mode for apps in Win 10?

Post by Dude »

Had a customer email me asking if my app will support Win 10's new "Dark Mode", because his PC is set to that mode but my app still shows as white to him. I'd never heard of it, until I read this article:

https://www.howtogeek.com/222614/how-to ... ark-theme/

It says in part: "it's up to each developer to support Dark Mode, and many do not. And, as we mentioned before, this option doesn’t affect most desktop applications. Those remain white."

I added bold to the quote above, as it relates directly to us as PureBasic developers, and we need to officially support this now. Damn. :( So, anyone know how to do this? I did some research but it appears not:

https://stackoverflow.com/questions/513 ... pplication

Quoting this link: "it looks like this option is not exposed to regular win32 applications directly, however it can be set / retrieved through HKCU(HKLM)\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme registry key."

And this page here:

https://github.com/Microsoft/winfile/issues/63

Says: "Win32 apps can add support the lite/dark mode switch as well very easily. They just need to manually "supply" their own theming. Just take a look at paint.net. It now has a dark mode that honors Windows 10's mode setting and can be set to dynamically switch based on the settings app or be set to always be dark or lite. But the software author had to manually design the look of the dark mode."

Anyone know what he means by "supply their own theming"? Hopefully just some file next to our exe? Dunno.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Dark Mode for apps in Win 10?

Post by Josh »

I can not say for sure. Dark Mode is just another Windows theme. Try changing the Windows theme manually and see if your app reacts to it.

If not, try to catch the Windows message WM_THEMECHANGED.
sorry for my bad english
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Dark Mode for apps in Win 10?

Post by Dude »

Josh wrote:Try changing the Windows theme manually and see if your app reacts to it.
It doesn't, which is the whole problem. Only UWP apps automatically do it when the OS theme changes. So, it's something that we're going to have to deal with manually for ourselves for Win32 apps. :(
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Dark Mode for apps in Win 10?

Post by Josh »

Here on Win7 a change of theme also works for Pb Apps as expected. Unfortunately I can't test it on Win10.

Try to create a simple clean window with PB and change the Windows theme. Does this window follow the changes?
sorry for my bad english
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Dark Mode for apps in Win 10?

Post by Dude »

This Dark Mode issue is for Win 10 only, which is why your test on Win 7 is irrelevant (sorry). It's not a theme change; it's a mode change. That's the difference. You can have a dark theme on Win 10 and also have a dark mode; they're two totally different things.

As for your second question, no, our PB apps don't change to dark when Dark Mode is enabled on Win 10 (the part in bold in my first post). Hence this topic. :) But it appears not possible at the moment, from what I've been reading and researching. It needs to be under the OS's control, so that MessageRequesters() and such also become dark.

Trust me: we're going to get users asking for our apps to support dark mode now, but I don't know how we're going to do it (if the OS doesn't do it).
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

Re: Dark Mode for apps in Win 10?

Post by Olliv »

Problem is when I have the time to dig and find an issue, there is no answer.

I trust you, that is sure, but just that there is a problem !

I had time 15 months ago but now I cannot help you.

I hope others will read and understand that sometimes a simple test can help the future for everyone.

It is good time because Fred is updating the last version.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Dark Mode for apps in Win 10?

Post by Dude »

@Olliv, what you posted 15 months ago is not the same issue here. My issue is new, in the recent 1809 build of Win 10, which only came out a few days ago on 2 Oct 2018. ;)
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

Re: Dark Mode for apps in Win 10?

Post by Olliv »

I prefer not to grow a debate : on MS, there is ways where display is dark, then no dark then dark again, etc...

I suppose Fred found solutions, but Microsoft is playing with all that is not Microsoft, just alternating.

So sure my link is opposite...
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Dark Mode for apps in Win 10?

Post by heartbone »

IMO with the limited resources available for the compiler development,
I'd prefer better support for Linux than any significant development effort be put into support for this new Windows® 10 "Dark Mode",
an obvious and lame gimmick :lol:, one that is not present in any of the other supported OSes.

"The Microsoft Edge web browser included with Windows 10 also has a dark theme. However, its dark theme option is entirely separate from the Dark Mode option in Settings for some reason."
Dude wrote:we need to officially support this now. Damn.
I don't believe that it should be a priority.
After all according to that first linked article, M$ doesn't respect the mode in its flagship browser,
the most important "app" in any modern computer OS.

If having the function is a deal breaker, write your own display toggle, change your customer's mind, or find a new client.
Keep it BASIC.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Dark Mode for apps in Win 10?

Post by Dude »

I'm only posting the question in case it becomes an easy addition to PureBasic, like DPI-awareness, or via an embedded manifest file or something. Time will tell. :)
Post Reply