/// <summary> /// 设置窗口点击穿透 /// </summary> /// <param name="window"></param> public void SetWindowPenetrate(IntPtr dest) { int style = User32Window.GetWindowLongA(dest, (int)WindowLongFlags.GWL_EXSTYLE); User32Window.SetWindowLong(dest, (int)WindowLongFlags.GWL_EXSTYLE, style | (int)UnmanagedMethods.WindowStyles.WS_EX_TRANSPARENT | (int)UnmanagedMethods.WindowStyles.WS_EX_LAYERED); User32Window.SetLayeredWindowAttributes(dest, 0, 255, 0x2); //User32Window.SetLayeredWindowAttributes(dest, 0, 100, 0); }