I want to determine if the mouse cursor is above a Windows Form and if so, change its color, but I'm kind of new to this and C# also. I was thinking of something like this:
public Form1()
{
InitializeComponent();
if (Control.MousePosition.Y >= 0 && Control.MousePosition.Y <= 499
&& Control.MousePosition.X >= 0 && Control.MousePosition.X <= 297)
this.BackColor = Control.DefaultForeColor;
}
but it does not work. Can anyone give me a hand? Thanks.