Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

programmatically change the windows color border of windows 7 [duplicate]

Tags:

c#

windows-7

Possible Duplicate:
How does Windows change Aero Glass color?

using c# how do you programmatically change the windows border color when running aero on windows 7?

like image 345
TheCardinal Avatar asked Dec 07 '09 10:12

TheCardinal


2 Answers

It is not possible to change the color of a window individually but you can change the color OS-wide via the resgistry. The entry should be something like this: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Glass Colorization\Swatches in conjunction with HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM - ColorizationColor

From within your code you can only adjust the shape and the size of your Glass border but I don't think the color. In Windows Forms it is done like this and in WPF like this.

like image 70
bitbonk Avatar answered Oct 20 '22 10:10

bitbonk


This isn't possible with C#/.NET. WPF/WindowsForms only allow you to change the borders on elements inside the application. Application borders are user-controlled.

like image 33
George Avatar answered Oct 20 '22 12:10

George