Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

DwmSetColorizationParameters (dwmapi)
 
.
Summary
TODO - a short description

C# Signature:

    [DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]
    private static extern void DwmSetColorizationParameters(ref DWM_COLORIZATION_PARAMS parameters,bool unknown);

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

just copy the sample and start the method and run it https://pinvoke.net/emoticons/regular_smile.gif

Please note that this is an undocumented API and as such is not supported by Microsoft and can be changed or removed in the future without futher notice.

Tips & Tricks:

A more reliable approach to set the colorization parameters would be to implement your own method that tries to set each parameter directly in the Windows registry and sends the WM_DWMCOLORIZATIONCOLORCHANGED message to notify all top-level windows about the change, with proper exception handling in the case a value cannot be set. The colorization parameters can be found under the key "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM". Please note that these are also undocumented and as such can also be changed or removed in the future.

Sample Code:

C# Sample

    [DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]
    private static extern void DwmSetColorizationParameters(ref DWM_COLORIZATION_PARAMS parameters,bool unknown);

    private struct DWM_COLORIZATION_PARAMS
    {
        public uint clrColor;
        public uint clrAfterGlow;
        public uint nIntensity;
        public uint clrAfterGlowBalance;
        public uint clrBlurBalance;
        public uint clrGlassReflectionIntensity;
        public bool fOpaque;
    }

    public void SetParameters(object sender, EventArgs e)
    {
        DWM_COLORIZATION_PARAMS temp = new DWM_COLORIZATION_PARAMS();
        temp.clrColor = 1802811644;
        temp.clrAfterGlow = 1802811644;
        temp.nIntensity = 8;
        temp.clrAfterGlowBalance = 43;
        temp.clrBlurBalance = 49;
        temp.clrGlassReflectionIntensity = 50;
        temp.fOpaque = false;

        DwmSetColorizationParameters(ref temp, false);

    }

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions