public static void SetDwmTransparent(bool enable) { var margins = new DwmMargin() { cxLeftWidth = enable ? -1 : 0 }; DwmExtendFrameIntoClientArea(GetUnityWindowHandle(), ref margins); }
public static void SetDwmTransparent(bool enable) { int margin = enable ? -1 : 0; var margins = new DwmMargin() { cxLeftWidth = margin, cxRightWidth = margin, cyTopHeight = margin, cyBottomHeight = margin, }; DwmExtendFrameIntoClientArea(GetUnityWindowHandle(), ref margins); }
public static extern uint DwmExtendFrameIntoClientArea(IntPtr hWnd, ref DwmMargin margins);