Second this response in the OS is possible in two ways, both with disabilities:
var f = new Form();
f.BackColor = Color.White;
f.FormBorderStyle = FormBorderStyle.None;
f.Bounds = Screen.PrimaryScreen.Bounds;
f.TopMost = true;
f.TransparencyKey = Color.White;
It's easy for the user to leave his application and not notice with ALT + TAB , outside it will not work. In other words, it is a beautiful gambiarra.
Or you may not use a Form
. A simplified code would look like this (it might be better written):
[DllImport("User32.dll")]
public static extern IntPtr GetDC(IntPtr hwnd);
[DllImport("User32.dll")]
public static extern void ReleaseDC(IntPtr hwnd, IntPtr dc);
...
IntPtr desktopPtr = GetDC(IntPtr.Zero);
Graphics g = Graphics.FromHdc(desktopPtr);
var b = new SolidBrush(Color.White);
g.FillRectangle(b, new Rectangle(0, 0, 1920, 1080)); //o algoritmo seria mais sofisticado
g.Dispose();
ReleaseDC(IntPtr.Zero, desktopPtr);
If the canvas is updated, the drawing will disappear, you can redesign it.
In practice the solution goes through something much more sophisticated.
If I find some other method, I'll update it here.