BlockInput

[DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)]
public static extern bool BlockInput(
   [MarshalAs(UnmanagedType.Bool)] bool fBlockIt
);

Microsoft documentation: Link

Last updated