Check out example codes for "C# move form without border". It will help you in understanding the concepts better.

Code Example 1

private bool mouseDown;
private Point lastLocation;

    private void Form1_MouseDown(object sender, MouseEventArgs e)
    {
        mouseDown = true;
        lastLocation = e.Location;
    }

    private void Form1_MouseMove(object sender, MouseEventArgs e)
    {
        if(mouseDown)
        {
            this.Location = new Point(
                (this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);

            this.Update();
        }
    }

    private void Form1_MouseUp(object sender, MouseEventArgs e)
    {
        mouseDown = false;
    }

Code Example 2

protected override void WndProc(ref Message m)
{
	switch(m.Msg)
	{
		case 0x84:
			base.WndProc(ref m);
			if((int)m.Result == 0x1)
				m.Result = (IntPtr)0x2;
			return;
	}

	base.WndProc(ref m);
}

Learn ReactJs, React Native from akashmittal.com