79229006

Date: 2024-11-27 05:18:08
Score: 1
Natty:
Report link

I found more elegant solution

    public const uint WDA_EXCLUDEFROMCAPTURE = 0x00000011;
    [DllImport("user32.dll")]
    public static extern uint SetWindowDisplayAffinity(IntPtr hWnd, uint dwAffinity);
...
    SetWindowDisplayAffinity(currentWindowhWnd, WDA_EXCLUDEFROMCAPTURE);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Павлик Бендер