Hi guys, for my G19 Applet, i also wanted to change the Aero Color. Some guys wanted to know, how it works. Even Google is very quiet in this question here.
Well, this is the code i tried out. Just play with the Values:
[DllImport("dwmapi.dll", EntryPoint = "#127", PreserveSig = false)]
public static extern void DwmGetColorizationParameters(out WDM_COLORIZATION_PARAMS parameters);
[DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]
public static extern void DwmSetColorizationParameters(ref WDM_COLORIZATION_PARAMS parameters, int uUnknown);
public struct WDM_COLORIZATION_PARAMS {
public uint Color1;
public uint Color2;
public uint Brightness;
public uint Saturation;
public uint Transparency;
public uint forget1;
public uint forget2;
}
And here a small Function:
public void SetColor(Color c, uint Saturation, uint Transparency, uint Brightness) {
WDM_COLORIZATION_PARAMS a = new WDM_COLORIZATION_PARAMS();
a.Color1 = (uint)c.ToArgb();
a.Color2 = (uint)c.ToArgb();
a.Saturation = Saturation;
a.Transparency = Transparency;
a.Brightness = Brightness;
DwmSetColorizationParameters(ref a, 0);
}
You can call it with:
SetColor(Color.Red, 155, 133, (uint)Color.Red.GetBrightness());
That’s it.
Have fun.
