Hello,
Welcome to Microsoft Q&A!
According to the link: https://github.com/Extrimis/Win32-Acrylic-Effect
SetWindowCompositionAttribute() is an undocumented api in windows which allows us to enable Acrylic Effect, DWM Blur (same as DwmEnableBlurBehindWindow()) and transparency for Window. Since it is an undocumented API this api might be changed or removed in future versions of windows.
As far as I'm concerned, the api is stopped working in Windows 11.
If you want to want to enable the Transparency Effects, as I said above, you can do this by modifying the registry value.
If you want to enable Acrylic Effect for the app, I suggest you could try to use winui2 to realize lt. Here is a sample you could refer to: Windows Forms Win2D Effects sample
Acrylic material
https://github.com/Microsoft/WinUI-Gallery
https://github.com/microsoft/Windows.UI.Composition-Win32-Samples
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.