デスクトップを記録するアプリケーションを構築する必要があります。デスクトップに線を描画して、デスクトップを記録していることをユーザーに通知します。記録が完了したら、線を消去したいと考えています。C#.net の Graphics を使用して線を描画します。以下のコードを確認してください。
IntPtr desktop = GetDC(IntPtr.Zero);
using (Graphics g1 = Graphics.FromHdc(desktop))
{
Pen blackPen = new Pen(Color.Orange, 10);
Point pleftTop = new Point(2, 1);
Point pleftBottom = new Point(2, 765);
g1.DrawLine(blackPen, pleftTop, pleftBottom);
Point pTopLeft = new Point(1, 3);
Point pTopRight = new Point(1356, 3);
g1.DrawLine(blackPen, pTopLeft, pTopRight);
Point pRight1 = new Point(1356, 1356);
Point pRight2 = new Point(1358, 1);
g1.DrawLine(blackPen, pRight1, pRight2);
Point pBottom1 = new Point(1, 765);
Point pBottom2 = new Point(1356, 765);
g1.DrawLine(blackPen, pBottom1, pBottom2);
string text = string.Empty;
int screenHeight = Screen.GetWorkingArea(this).Height;
int screenWidth = Screen.GetWorkingArea(this).Width;
text = "Recording your screen & audio";
int centerWidth = ((screenWidth / 3));
int opacity = 255;
g1.PixelOffsetMode = PixelOffsetMode.HighQuality;
g1.DrawString(text, new Font("Arial", 15), new SolidBrush(Color.FromArgb(opacity, Color.WhiteSmoke)), centerWidth, 0);