Call Win32 API [System.Runtime.InteropServices.DllImportAttribute ("user32.dll", EntryPoint = "MoveWindow")] Public static extern bool MoveWindow (system.intptr hWnd, int X, int Y, int nwidth, int nheight, bool brepaint); Open the form method, FileName is the form name that contains the path private void Openandsetwindow (String fileName) { process P = new process (); /new Process p.StartInfo.FileName = filename;//Set process name P.startinfo.createnowindow = true; P.startinfo.windowstyle = Processwindowstyle.normal; P.start (); MoveWindow (P.mainwindowhandle, Max, N, +, +, true); P.mainwindowhandle is the handle of the window you want to move, 200,300 is the horizontal ordinate in the upper-left corner of the moving window, and 500,400 is the width and height of the post-move window; True indicates that the moved window needs to be redrawn }
C # Controls other program window locations