using System.Runtime.InteropServices;
[DllImport("user32.dll")]
private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, uint nWidth, uint nHeight, bool bRepaint);
private void MoveWinResize(IntPtr hWnd, int X, int Y, uint nWidth, uint nHeight, bool bRepaint = true)
{
MoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint);
}
C#