Reputation: 11652
I have several programs already made that extended the Non-client area of the Window and drew controls and other things on it - these programs worked well on Windows 7 and Vista.
I've just tried writing some new ones and even using old ones that worked on Windows 7, on my Windows 8 machine and none of them work. A black screen is displayed. I've also tried all of the usual code project articles and other answers here on SO and used their code - but it doesn't matter what code I use, it just doesn't seem possible in Windows 8.
I know that Windows 8 does not have "Aero", but how do I successfully extend the Non-client area of the Window (titlebar) and draw on it?
Upvotes: 5
Views: 1052
Reputation: 725
If you just want to extend the color of the non client area you could get the window color from the registry.
int argbColor = (int)Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software
\Microsoft\Windows\DWM", "ColorizationColor", null);
var c = System.Drawing.Color.FromArgb(argbColor);
Upvotes: 1