I understand your concern about copyright issues and your desire to find alternative ways to achieve similar goals. There are several different methods you could use to create a Windows overlay. Here are two alternative approaches:

    Using Transparent Layered Windows in WinForms:

You can create an overlay using WinForms by creating a transparent and topmost form that covers the target window. Here's a sample code:

csharp:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace OverlayWinFormsSample
{
    public class OverlayForm : Form
    {
        private readonly Form _targetForm;

        public OverlayForm(Form targetForm)
        {
            _targetForm = targetForm;

            // Set the overlay's location, size, and transparency
            StartPosition = FormStartPosition.Manual;
            Location = _targetForm.Location;
            Size = _targetForm.Size;
            BackColor = Color.Magenta;
            TransparencyKey = Color.Magenta;

            // Set the overlay's window style
            FormBorderStyle = FormBorderStyle.None;
            TopMost = true;

            // Attach event handlers
            _targetForm.LocationChanged += TargetForm_LocationChanged;
            _targetForm.SizeChanged += TargetForm_SizeChanged;
        }

        private void TargetForm_LocationChanged(object sender, EventArgs e)
        {
            Location = _targetForm.Location;
        }

        private void TargetForm_SizeChanged(object sender, EventArgs e)
        {
            Size = _targetForm.Size;
        }
    }
}

Using DirectX or OpenGL for Rendering:

Another approach to creating a Windows overlay is by using graphics libraries like DirectX or OpenGL. This method requires more knowledge of computer graphics, but it provides more control over the rendering process. Here's a sample code using SharpDX, a popular managed wrapper for DirectX:

csharp:

using System;
using SharpDX;
using SharpDX.Direct2D1;
using SharpDX.DXGI;
using SharpDX.Windows;
using AlphaMode = SharpDX.Direct2D1.AlphaMode;
using Factory = SharpDX.Direct2D1.Factory;

namespace OverlayDirectXSample
{
    public class OverlayForm : RenderForm
    {
        private RenderTarget _renderTarget;
        private SolidColorBrush _brush;
        private Factory _factory;

        public OverlayForm()
        {
            // Set the overlay's window style
            TopMost = true;
            WindowState = FormWindowState.Maximized;
            FormBorderStyle = FormBorderStyle.None;
            
            // Initialize DirectX
            InitializeDirectX();
        }

        private void InitializeDirectX()
        {
            _factory = new Factory();

            var renderProperties = new HwndRenderTargetProperties
            {
                Hwnd = Handle,
                PixelSize = new Size2(ClientSize.Width, ClientSize.Height),
                PresentOptions = PresentOptions.None
            };

            var properties = new RenderTargetProperties(RenderTargetType.Hardware,
                new PixelFormat(Format.B8G8R8A8_UNorm, AlphaMode.Premultiplied), 0, 0, RenderTargetUsage.None,
                FeatureLevel.Level_DEFAULT);

            _renderTarget = new WindowRenderTarget(_factory, properties, renderProperties);
            _brush = new SolidColorBrush(_renderTarget, Color.Red);
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            // Clear the render target and set the overlay color
            _renderTarget.BeginDraw();
            _renderTarget.Clear(Color.Transparent);
            _renderTarget.FillRectangle(new RectangleF(100, 100, 200, 200), _brush);
            _renderTarget.EndDraw();
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            _brush?.Dispose();
            _renderTarget?.Dispose();
            _factory?.Dispose();
        }
    }
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence