Currently I'm using SetParent()
to do that. It this "hacky"? is there a better way to do that? if so, how?
here's what I'm using currently:
void LoadApplication(string path, IntPtr handle)
{
var p = Process.Start(path);
p.WaitForInputIdle();
Thread.Sleep(1000);
SetParent(p.MainWindowHandle, handle);
SetWindowPos(p.MainWindowHandle, 0, 0, 0, 0, 0, 0x0001 | 0x0040);
}