Windows GUI white borders in dark mode

4 posts · Closed

Chris Guest
6 Feb 2022

Maybe you can help me diag a long-standing Windows GUI annoyance.

Back-story: this PC's system drive has been cloned/upgraded since probably WinXP, so I believe the problem was introduced long before dark mode existed in Windows. I've also narrowed down my user profile to being the cause of the behaviour - I just don't feel like creating a new profile and copying settings over. Until the dark mode was added to Network Scanner, I only ever saw it in Windows system context menus (and only in File Explorer), but both have thick white borders.

Since your program has the same thick white lines in dark mode (and I assume that it's not by design), maybe you have an idea where in the registry these sorta broken theme-related settings are parked? I've looked every now and then for years to find them, to no avail. Have seen this Windows issue mentioned in some forums, but again no solution.

No worries if you don't have the time, nor a clue what I'm talking about. Thanks for reading, at least.

Cheers, and love your program. Loooooong time paid user.

Ann SoftPerfect
6 Feb 2022

Thanks for pointing out the issue with the menu. We have checked the code and it turned out that we were not 100% correctly setting the menu background.

Specifically, there is a function called SetMenuInfo that amongst others takes two flags: MIM_BACKGROUND and MIM_APPLYTOSUBMENUS. The issue here that we were passing only MIM_BACKGROUND without MIM_APPLYTOSUBMENUS. This resulted in the menu background being drawn in the default grey colour.

Now we have fixed it. Please download the latest build, all menus should look good now.

I am afraid we can't help with fixing this in Windows though. There may even be no registry setting, but a similar issue in Microsoft's code. Another possibility may be that that one of the menu extensions (TreeSize, Git or AMD) causes Windows to recreate menu handle, so the background setting is lost. That's just our guess.

Chris Guest
6 Feb 2022

Hmm no, that doesn't fix it. But in any case, its not a big deal, and probably only affects a very small number of customers who have their profiles broken in this exact way. Whatever it is, it's actually not the color, its the menu border thickness/width - and the same issue displays in Windows Explorer. It should be ~1px in Windows normally, and on a different profile your program shows the border correctly just like Windows Explorer context in dark mode: 1px, white. On my regular profile both your program and Win Explorer have that extra-wide menu border.
Oh well. Thanks for the suggestions - ill look at maybe one of the context addons.

Ann SoftPerfect
6 Feb 2022

The changes that we have made that remove the white borders should work on a valid profile and Windows settings. So if the Windows Explorer shows the menus nicely, so will our app. In your regular profile however it seems something is not quite right, so both Windows and NetScanner menus have this border.

I would recommend recreating the profile to ensure both Windows Explorer and our app display nicely. I know you mentioned you didn't particularly want to do it, but it may be the only way to fix it.

This topic is closed. It has had no new posts for over a year, so the software versions it talks about may be out of date. Start a new topic in Network Scanner if you have a similar question.