更新时间:2023-11-30 17:32:28
无法单独更改窗口的颜色,但您可以通过 resgistry 更改 OS 范围内的颜色.条目应该是这样的:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Glass Colorization\Swatches
与 HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM - ColorizationColor代码>
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
在您的代码中,您只能调整 Glass 边框的形状和大小,但我认为不能调整颜色.在 Windows 窗体中,它是这样做的 这个和在 WPF 这样的.
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.