Jump to content

Change Windows 7 Aero Color


Recommended Posts

How can I change aero glass color from my program? All I have found is this:

[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(WDM_COLORIZATION_PARAMS parameters, uint uUnknown);
public struct WDM_COLORIZATION_PARAMS {
    public uint Color1;
    public uint Color2;
    public uint Intensity;
    public uint Unknown1;
    public uint Unknown2;
    public uint Unknown3;
    public uint Opaque;
}

source:

http://stackoverflow.com/questions/1487919/how-does-windows-change-aero-glass-color

And I don't have a clue about using external dll's. Can anyone help?

Link to comment
Share on other sites

Link

Global Const $tagCOLORIZATIONPARAMS = 'dword Color;dword AftGlow;uint Intensity;uint AftGlowBal;uint BlurBal;uint GlassReflInt uint Opaque'

$tCP = DllStructCreate($tagCOLORIZATIONPARAMS)
$Ret = DllCall('dwmapi.dll', 'uint', 'DwmGetColorizationParameters', 'ptr', DllStructGetPtr($tCP))
;If (@error) Or ($Ret[0]) Then
;    Error
;EndIf
DllStructSetData($tCP, 'Color', ...) ; Set a new color
$Ret = DllCall('dwmapi.dll', 'uint', 'DwmSetColorizationParameters', 'ptr', DllStructGetPtr($tCP), 'uint', 0)
;If (@error) Or ($Ret[0]) Then
;    Error
;EndIf
Link to comment
Share on other sites

You need to call these functions by ordinal

Global Const $tagCOLORIZATIONPARAMS = 'dword Color;dword AftGlow;uint Intensity;uint AftGlowBal;uint BlurBal;uint GlassReflInt; uint Opaque'

$tCP = DllStructCreate($tagCOLORIZATIONPARAMS)
$Ret = DllCall('dwmapi.dll', 'uint', 127, 'ptr', DllStructGetPtr($tCP))

DllStructSetData($tCP, 'Color', 0x00FF00) ; Set a new color
DllStructSetData($tCP, 'Intensity', -1) ; Set a new Intensity
DllStructSetData($tCP, 'Opaque', 0) ; Set a new Opaque
$Ret = DllCall('dwmapi.dll', 'uint', 131, 'ptr', DllStructGetPtr($tCP), 'uint', 0)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...