First Set the FormBorderStyle to none, Add a panel to the Form and set the panels dock style to Dockstyle.Top. Now add 3 Panels to the first Panel and set the desired image to the panels background image. When the forms border is Gone So is the ability to move the form. To fix this add a mousedown, mouseup, and mousemove Events to your code and also a bool value of private bool CanMove and private Point currentPosition.
Now that we have this in place use these codes.
using System.Drawing;
private bool CanMove;
private Point currentPosition;
private void panel1_MouseDown(object sender, EventArgs e)
{
CanMove = true;
currentPosition.X = e.X;
currentPosition.Y = e.Y;
}
private void panel1_MouseUp(object sender, EventArgs e)
{
CanMove = false;
}
private void panel1_MouseMove(object sender, EventArgs e)
{
if (CanMove)
{
Point newPosition = Control.MousePosition;
newPosition.X = newPosition.X - currentPosition.X;
newPosition.Y = newPosition.Y - currentPosition.Y;
this.Location = newPosition;
}
}