Check out example codes for "drag form in C# winform". It will help you in understanding the concepts better.

Code Example 1

[DllImport("user32")]
private static extern bool ReleaseCapture();

[DllImport("user32")]
private static extern int SendMessage(IntPtr hWnd, int Msg, int wp, int lp);

protected override void OnMouseDown(MouseEventArgs e)
{
  	base.OnMouseDown(e);
	if (e.Button == MouseButtons.Left)
    {
    	ReleaseCapture();
      	SendMessage(Handle, 161, 2, 0);
    }
}

Learn ReactJs, React Native from akashmittal.com