同样该功能需要加载命名空间 using System.Runtime.InteropServices; 代码如下:private const uint WS_EX_LAYERED = 0x80000; private const int WS_EX_TRANSPARENT = 0x20; private const int GWL_STYLE = (-16); private const int GWL_EXSTYLE = (-20); private const int LWA_ALPHA = 0; [DllImpor