The user Jimi posted a fully working implementation in C# here:
How to create a semi transparent or blurred backcolor in a Windows Form
It has additional explanations, covers Windows 7 - 11 and the code is neatly organized and readable.