I have a simple program that you can draw on the screen with FillEllipse and FillRectangle. My problem is that when you drag another window over even a small portion of the scre
You can put a PictureBox control on your form and draw to that instead and it won't be erased when other windows paint over it:
do this once, on form_load or something:
pictureBox1.Image = new Bitmap(Width, Height);
to draw:
Graphics.FromImage(pictureBox1.Image).FillRectangle(Brushes.Black, 0, 0, 100, 100);
pictureBox1.Refresh();