public static bool WindowDisableRendering(IntPtr hWnd)
 {
     DWMNCRENDERINGPOLICY NCRP = DWMNCRENDERINGPOLICY.Disabled;
     int ncrp = (int)NCRP;
     // Disable non-client area rendering on the window.
     int result = SafeNativeMethods.DwmSetWindowAttribute(hWnd, DWMWINDOWATTRIBUTE.NCRenderingPolicy, ref ncrp, sizeof(int));
     return (result == 0);
 }
Esempio n. 2
0
 public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE attr, ref DWMNCRENDERINGPOLICY attrValue, int attrSize);