To create form fade out or fade in, you can change the value of opacity property by repetition. (Increase or decrease value by 0.1)
using System.Threading;
private void Form1_MouseHover(object sender, EventArgs e)
{
Point ptCursor = Cursor.Position;
ptCursor = PointToClient(ptCursor);
if (this.ClientRectangle.Contains(ptCursor))
{
i = this.Opacity;
while (i <= 1)
{
i += 0.1;
this.Opacity = i;
Thread.Sleep(30);
}
}
}