Так все просто же
this.MainForm.Location = new System.Drawing.Point(0,0);
this.MainForm.Size = new System.Drawing.Size(430, 272);
Если внешнее приложение
string i = "C:\\My.exe";
if (!System.IO.File.Exists(i))
{
MessageBox.Show("Программа My.exe не установлена!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
try
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.EnableRaisingEvents = false;
p.StartInfo.FileName = i;
p.StartInfo.Arguments = "1 2 3"; //Аргументы командной строки
p.Start();
p.WaitForInputIdle();
}
catch
{
MessageBox.Show("Программа My.exe не запускается!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
далее
Process.MainWindowHandle.
и SetWindowPos
[DllImport("core.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, SetWindowPosFlags uFlags);
http://www.pinvoke.net/default.aspx/user32/SetWindowPos.html