I am working on an on-screen cursor highlighting project for my needs C# windows forms and I'm stuck with a problem, I already made my form transparent so I could draw a filled ellipse on the form and make the form follow my cursor, the only problem here is that I can't click anything with this white ellipse following my cursor. If somebody can tell me how to make the ellipse pass my clicks it would help so much
The thing is that I tried to search for answers, but I found other things that didn't help me.
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
timer1.Start();
this.AllowTransparency = true;
this.Opacity = 50;
this.TopMost = true;
}
private void Timer1_Tick(object sender, EventArgs e)
{
Point pt = Cursor.Position;
pt.Offset(-(this.Width / 2), -(this.Height / 2));
this.Location = pt;
}
private void Form2_Paint(object sender, PaintEventArgs e)
{
SolidBrush solidBrush = new SolidBrush(
Color.FromArgb(255, 255, 0));
e.Graphics.FillEllipse(solidBrush, (Width - 60) / 2, (Height - 60) / 2, 60, 60);
}
}